trd_fedServer_initialize(string domain, string device) { } trd_fedServer_valueChanged( string domain, string device, int Fsm_dot_State, string &fwState ) { if (Fsm_dot_State == 4) { fwState = "OFF"; } else if (Fsm_dot_State == 5) { fwState = "STANDBY"; } else if (Fsm_dot_State == 42) { fwState = "INITIALIZING"; } else if (Fsm_dot_State == 43) { fwState = "STBY_INITIALIZED"; } else if (Fsm_dot_State == 45) { fwState = "TESTING"; } else if (Fsm_dot_State == 44) { fwState = "CONFIGURING"; } else if (Fsm_dot_State == 3) { fwState = "CONFIGURED"; } else if (Fsm_dot_State == 6) { fwState = "READY"; } else if (Fsm_dot_State == 13) { fwState = "ERROR"; } else if (Fsm_dot_State == 2) { fwState = "NO_CONTROL"; } } trd_fedServer_doCommand(string domain, string device, string command) { string target; if (command == "GO_STANDBY") { dpSet(device+".Fsm.Action",30); dpGet(device+".Description", target); dpSet("Trd.ConfigureFero.Target", target,"Trd.ConfigureFero.CommandId",30); } if (command == "GO_OFF") { dpSet(device+".Fsm.Action",150); dpGet(device+".Description", target); dpSet("Trd.ConfigureFero.Target", target,"Trd.ConfigureFero.CommandId",150); } if (command == "INITIALIZE") { anytype valueOf_FEE_TAG; fwDU_getCommandParameter(domain, device, "FEE_TAG", valueOf_FEE_TAG); dpSet(device+".Fsm.Action",valueOf_FEE_TAG); dpGet(device+".Description", target); dpSet("Trd.ConfigureFero.Target", target,"Trd.ConfigureFero.CommandId",valueOf_FEE_TAG); } if (command == "TEST") { anytype valueOf_FEE_TAG; fwDU_getCommandParameter(domain, device, "FEE_TAG", valueOf_FEE_TAG); dpSet(device+".Fsm.Action",valueOf_FEE_TAG); dpGet(device+".Description", target); dpSet("Trd.ConfigureFero.Target", target,"Trd.ConfigureFero.CommandId",valueOf_FEE_TAG); } if (command == "CONFIGURE") { anytype valueOf_FEE_TAG; fwDU_getCommandParameter(domain, device, "FEE_TAG", valueOf_FEE_TAG); dpSet(device+".Fsm.Action",valueOf_FEE_TAG); dpGet(device+".Description", target); dpSet("Trd.ConfigureFero.Target", target,"Trd.ConfigureFero.CommandId",valueOf_FEE_TAG); } /* Not usable for the time being if (command == "GO_READY") { dpSet(device+".Fsm.Action",70); dpGet(device+".Description", target); dpSet("Trd.ConfigureFero.Target", target,"Trd.ConfigureFero.CommandId",500); } if (command == "GO_CONFIGURED") { dpSet(device+".Fsm.Action",80); dpGet(device+".Description", target); dpSet("Trd.ConfigureFero.Target", target,"Trd.ConfigureFero.CommandId",350); } */ if (command == "RECOVER") { dpSet(device+".Fsm.Action",40); dpGet(device+".Description", target); dpSet("Trd.ConfigureFero.Target", target,"Trd.ConfigureFero.CommandId",40); } }