# fcomBlobAo.template: Writes ao value to an FCOM blob
record( ao, "$(BLOB)AIMAX_SIM" )
{
	field( DOL,  "" )
	field( OMSL, "supervisory" )
	field( SCAN, "Passive" )
	field( EVNT, "40" )
	field( TSE,  "40" )
	field( DTYP, "FCOM" )
	field( OUT,  "#C0S$(GROUP)@$(BLOB)AIMAX" )
	field( EGU,  "" )
	field( PREC, "3" )
	field( FLNK, "" )
	info( autosaveFields, "HHSV HIGH HIHI HSV LLSV LOLO LOW LSV EGU DESC HOPR LOPR PREC VAL" )
}
# fcomBlobAo.template: Writes ao value to an FCOM blob
record( ao, "$(BLOB)BIMAX_SIM" )
{
	field( DOL,  "" )
	field( OMSL, "supervisory" )
	field( SCAN, "Passive" )
	field( EVNT, "40" )
	field( TSE,  "40" )
	field( DTYP, "FCOM" )
	field( OUT,  "#C1S$(GROUP)@$(BLOB)BIMAX" )
	field( EGU,  "" )
	field( PREC, "3" )
	field( FLNK, "" )
	info( autosaveFields, "HHSV HIGH HIHI HSV LLSV LOLO LOW LSV EGU DESC HOPR LOPR PREC VAL" )
}
# A template that can be used to update one or more
# blob output records, add them to a group, and send them.

record( calc, "$(BLOB)SIM_SIN" )
{
	field( CALC, "sin(a); a:=a+d2r" )
	field( SCAN, "$(SCAN=Passive)" )
	field( EVNT, "$(EC=40)" )
	field( PREC, "5" )
	field( FLNK, "$(BLOB)SIM_COS" )
}

record( calc, "$(BLOB)SIM_COS" )
{
	field( CALC, "cos(a); a:=a+d2r" )
	field( PREC, "5" )
	field( FLNK, "$(BLOB)SIM_SEQ" )
}

record( seq, "$(BLOB)SIM_SEQ" )
{
	field( DOL1, "$(BLOB)SIM_SIN" )
	field( LNK1, "$(BLOB)AIMAX_SIM PP" )

	field( DOL2, "$(BLOB)SIM_COS" )
	field( LNK2, "$(BLOB)BIMAX_SIM PP" )

	field( DOL3, "$(BLOB)SIM_SIN" )
	field( LNK3, "" )

	field( DOL4, "$(BLOB)SIM_COS" )
	field( LNK4, "" )

	field( DOL5, "$(BLOB)SIM_SIN" )
	field( LNK5, "" )

	field( DOL6, "$(BLOB)SIM_COS" )
	field( LNK6, "" )

	field( DOL7, "$(BLOB)SIM_SIN" )
	field( LNK7, "" )

	field( DOL8, "$(BLOB)SIM_COS" )
	field( LNK8, "" )

	field( DOL9, "$(BLOB)SIM_SIN" )
	field( LNK9, "" )

	field( DOLA, "$(BLOB)SIM_COS" )
	field( LNKA, "" )

	field( FLNK, "$(BLOB)ALL_ADD" )
}

# This record adds (writes) the blob to the fcom group
record( bo, "$(BLOB)ALL_ADD" )
{
	field( TSE,  "$(EC=40)" )
	field( DTYP, "FCOM" )
	field( ZNAM, "Wait" )
	field( ONAM, "Add" )
	field( OUT,  "#C0S$(GROUP)@$(BLOB)ALL_ADD" )
	field( HIGH, "0.0001" )
	field( FLNK, "$(NEXT=$(BLOB)ALL_SEND)" )
	info( autosaveFields, "OSV ZSV DESC" )
}
