INOS
|
Public Types | |
enum | { eCmdINOSMcModuleFirst = eCmdINOSTaskExLast+1 , eCmdOn , eCmdOff , eCmdSafe , eCmdInit , eCmdHome , eCmdRecover , eCmdStart , eCmdStop , eCmdPause , eCmdResume , eCmdCancel , eCmdRetry , eCmdConfirm , eCmdManual , eCmdPrepare , eCmdBackup , eCmdRestore , eCmdCreateSubModule , eCmdDestroySubModule , eCmdCreateData , eCmdDestroyData , eCmdMoveData , eCmdMoveDataInt , eCmdCreateJob , eCmdDestroyJob , eCmdCreateScript , eCmdDestroyScript , eCmdRunJob , eCmdRunScript , eCmdRunRegisteredLuaFunction , eCmdSetMode , eCmdSetModeAuto , eCmdSetModeStep , eCmdSetModeSetup , eCmdClrModeSetup , eCmdSetOut , eCmdGetIO , eCmdWaitBitEx , eCmdWaitInp , eCmdWaitAdc , eCmdWaitPos , eCmdWaitAxis , eCmdSetCounter , eCmdCntInc , eCmdCntDec , eCmdCntAdj , eCmdCronEnable , eCmdCronDisable , eCmdCronTouch , eCmdCronCount , eCmdCanLoad , eCmdValveActivate , eCmdValveRelease , eCmdAddInpResource , eCmdAddOutResource , eCmdAddAdcResource , eCmdAddDacResource , eCmdINOSMcModuleLast } |
enum | { eUsrINOSMcModuleFirst = eUsrINOSTaskExLast+1 , eUsrEmgSet , eUsrEmgClr , eUsrSTOSet , eUsrSTOClr , eUsrMsgSet , eUsrMsgAck , eUsrSlowMotionChanged , eUsrSimLevelChanged , eUsrLinkDown , eUsrSTOConfirmSet , eUsrSTOConfirmClr , eUsrSafetyConfigUpdate , eUsrINOSMcModuleLast } |
enum | { eIntINOSMcModuleFirst = eIntINOSTaskExLast + 1 , eIntGetResource , eIntWaitTimeout , eIntINOSMcModuleLast } |
enum | { eStaINOSMcModuleFirst = eStaINOSTaskExLast+1 , eStaINOSMcModuleLast } |
enum | { eModAuto , eModSequential , eModStep , eModLast } |
enum | { eSimNo , eSimSemi , eSimFull } |
enum | { eStaJobNone , eStaJobRunning , eStaJobCompleted , eStaJobStopped , eStaJobCanceled , eStaJobFailed , eStaJobError , eStaJobFatal , eStaJobRejected , eStaJobIgnored , eStaJobInComplete , eStaJobPaused } |
enum | { eOptCoord = 0x00000100 , eOptMode = 0x00000200 , eOptGuard = 0x00000400 , eOptConc = 0x00000800 , eOptCron = 0x00001000 , eOptSafety = 0x00002000 , eOptResMcM4 = 0x00004000 , eOptResMcM5 = 0x00008000 } |
enum | EFlags : uint64 { eFlgResource = 0x00000100 , eFlgOn = 0x00000200 , eFlgInit = 0x00000400 , eFlgSetup = 0x00000800 , eFlgJob = 0x00001000 , eFlgBackup = 0x00002000 , eFlgPaused = 0x00004000 , eFlgSafe = 0x00008000 , eFlgCreated = 0x0000010000000000LL } |
enum | { eReqOff = 0x00000100 , eReqStop = 0x00000200 , eReqCancel = 0x00000400 , eReqStep = 0x00000800 , eReqStart = 0x00001000 , eReqPause = 0x00002000 , eReqSafe = 0x00004000 , eReqSetup = 0x00008000 } |
enum | { eCrtWaitObj = 0x00000100 , eCrtResMcM1 = 0x00000200 , eCrtResMcM2 = 0x00000400 , eCrtResMcM3 = 0x00000800 , eCrtResMcM4 = 0x00001000 , eCrtResMcM5 = 0x00002000 , eCrtResMcM6 = 0x00004000 , eCrtResMcM7 = 0x00008000 } |
enum | ETypWait { eTypWaitGt =0 , eTypWaitGte =1 , eTypWaitLt =2 , eTypWaitLte =3 , eTypWaitEq =4 , eTypWaitNe =5 } |
![]() | |
enum | { eSourceIdMsg = 255 , eSourceIdLua = 254 , eSourceIdFastLoad = 253 } |
predefined source id's | |
enum | { eMsgCmd =CINOSTaskExDef::eMsgCmd , eMsgCall =CINOSTaskExDef::eMsgCall , eMsgEvent =CINOSTaskExDef::eMsgEvent , eMsgReply =CINOSTaskExDef::eMsgReply , eMsgUser =CINOSTaskExDef::eMsgUser , eMsgSub =CINOSTaskExDef::eMsgSub , eMsgInternal =CINOSTaskExDef::eMsgInternal , eMsgMessage =CINOSTaskExDef::eMsgMessage } |
message types | |
enum | ERplId { eRplOk =CINOSTaskExDef::eRplOk , eRplSkipped =CINOSTaskExDef::eRplSkipped , eRplInComplete =CINOSTaskExDef::eRplInComplete , eRplIgnored =CINOSTaskExDef::eRplIgnored , eRplPaused =CINOSTaskExDef::eRplPaused , eRplStopped =CINOSTaskExDef::eRplStopped , eRplCanceled =CINOSTaskExDef::eRplCanceled , eRplRejected =CINOSTaskExDef::eRplRejected , eRplFailed =CINOSTaskExDef::eRplFailed , eRplError =CINOSTaskExDef::eRplError , eRplFatal =CINOSTaskExDef::eRplFatal , eRplTimeout =CINOSTaskExDef::eRplTimeout } |
reply id's | |
enum | { eCmdINOSTaskExFirst , eCmdFailure , eCmdStartup , eCmdShutdown , eCmdShutdownRequest , eCmdSwitchCore , eCmdSetFlag , eCmdClrFlag , eCmdStopMsg , eCmdSetIdleTimeout , eCmdINOSTaskExLast } |
enum | { eUsrINOSTaskExFirst , eUsrMsgDone , eUsrNvUpdate , eUsrIdleTimeout , eUsrINOSTaskExLast } |
enum | { eIntINOSTaskExFirst , eIntAddCommand , eIntRemCommand , eIntDeleteCommand , eIntGetCommands , eIntGetProp , eIntSetProp , eIntAddProp , eIntGetActual , eIntSetActual , eIntAddActual , eIntINOSTaskExLast } |
enum | { eMessageAdd , eMessageRemove , eMessageModify , eMessageAcknowledge } |
enum | { eEvtTicks , eEvtNs } |
enum | { eStaStartup = DEF_eStaStartup , eStaOff = DEF_eStaOff , eStaWait = DEF_eStaWait , eStaOn = DEF_eStaOn , eStaReady = DEF_eStaReady , eStaBusy = DEF_eStaBusy , eStaError = DEF_eStaError , eStaINOSTaskExLast } |
enum | { eOptOwner = 0x00000001 , eOptStat = 0x00000002 , eOptMsg = 0x00000004 , eOptNvR = 0x00000008 , eOptOvld = 0x0000010 , eOptCaS = 0x0000020 , eOptResTsk2 = 0x0000040 , eOptResTsk3 = 0x0000080 } |
enum | { eFlgError = 0x00000001 , eFlgFatal = 0x00000002 , eFlgEmergency =0x00000004 , eFlgSTO = 0x00000008 , eFlgResTsk4 = 0x00000010 , eFlgResTsk5 = 0x00000020 , eFlgResTsk6 = 0x00000040 , eFlgResTsk7 = 0x00000080 } |
enum | { eReqResTsk0 = 0x00000001 , eReqResTsk1 = 0x00000002 , eReqResTsk2 = 0x00000004 , eReqResTsk3 = 0x00000008 , eReqResTsk4 = 0x00000010 , eReqResTsk5 = 0x00000020 , eReqResTsk6 = 0x00000040 , eReqResTsk7 = 0x00000080 } |
enum | { eCrtSendMsg = 0x00000001 , eCrtResTsk1 = 0x00000002 , eCrtResTsk2 = 0x00000004 , eCrtResTsk3 = 0x00000008 , eCrtResTsk4 = 0x00000010 , eCrtResTsk5 = 0x00000020 , eCrtResTsk6 = 0x00000040 , eCrtResTsk7 = 0x00000080 } |
enum | { eDispFlagINCOSync = 0x00000001 } |
enum | eTaskExMsgFlags { eMsgFlagNone = 0x00000000 , eMsgFlagNoWait = 0x00000001 } |
enum | EDispatchStyle { eDispatchNone , eDispatchNormal , eDispatchInternal , eDispatchPre } |
![]() | |
enum | ETskType { eTskTypeBoot = 0 , eTskTypeResource = 1 , eTskTypeSystem = 2 , eTskTypeApplication = 3 , eTskTypeCommunication = 4 , eTskTypeRealtime = 5 , eTskTypeInterrupt = 6 , eTskTypeBackground = 7 , eTskTypeLua = 8 , eTskTypeTest = 9 , eTskTypeReserved0 = 10 , eTskTypeReserved1 = 11 , eTskTypeUser0 = 12 , eTskTypeUser1 = 13 , eTskTypeUser2 = 14 , eTskTypeUser3 = 15 } |
Task types. | |
Public Member Functions | |
virtual CMcResult | On (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
Switch module on. | |
virtual CMcResult | Off (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
Switch module off. | |
virtual CMcResult | Safe (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
Put module into a safe state. | |
virtual CMcResult | Init (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
Init module. After a successful init the module is in state ready. | |
virtual CMcResult | Home (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
Bring module into home position. | |
virtual CMcResult | Recover (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
Recover module from a pending error. | |
virtual CMcResult | Start (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
Depending on the current module state this method has different meanings. If the module is in state off -> On is called, if it is in state on -> Init is called, if it is in state ready->a production job is started. | |
virtual CMcResult | Stop () |
Stop a running production job. | |
virtual CMcResult | Stop (CINOSSync *apSync) |
Stop a running production job. | |
virtual CMcResult | Stop (const char *apParam) |
Stop a running production job. | |
virtual CMcResult | Pause (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
Pause a running production job. | |
virtual CMcResult | Resume (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
Acknowledge the first pending message with the flag INOS_MCMSG_FLAG_RESUME This method is used to go further in single step mode. | |
virtual CMcResult | Cancel () |
Cancel everything. | |
virtual CMcResult | Cancel (CINOSSync *apSync) |
Cancel everything. | |
virtual CMcResult | Cancel (const char *apParam) |
Cancel everything. | |
virtual CMcResult | Retry (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
Acknowledge the first pending message with the flag INOS_MCMSG_FLAG_RETRY. | |
virtual CMcResult | Confirm (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
Acknowledge the first pending message with the flag INOS_MCMSG_FLAG_CONFIRM. | |
virtual CMcResult | Manual (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
Acknowledge the first pending message with the flag INOS_MCMSG_FLAG_MANUAL (obsolete) | |
virtual CMcResult | Prepare (real64 arStage, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
Prepare module for given stage. This method only makes sense if its internal implementation is overwritten by the user module. | |
virtual CMcResult | Backup (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
Backup current state and call backup of all my chidren. | |
virtual CMcResult | Restore (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
Restore backuped state call restore of all my chidren. | |
virtual CMcResult | CreateSubModule (const char *apName, const char *apType, const char *apParam, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
Create a sub module, see also Creation. | |
virtual CMcResult | DestroySubModule (const char *apName, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
Destroy requested sub module. | |
virtual CMcResult | CreateData (const char *apName, const char *apType, const char *apParam, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
create data (container) | |
virtual CMcResult | DestroyData (const char *apName, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
destroy data (container) | |
virtual CMcResult | MoveData (const char *apSrcName, const char *apDstModule, const char *apDstName, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
move data (container) | |
virtual CMcResult | CreateJob (const char *apName, const char *apType, const char *apParam, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
create job | |
virtual CMcResult | DestroyJob (const char *apName, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
destroy Job | |
virtual CMcResult | CreateScript (const char *apName, const char *apType, const char *apParam, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
create script | |
virtual CMcResult | DestroyScript (const char *apName, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
destroy script | |
virtual CMcResult | RunJob (const char *apName, const char *apParam, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
run job | |
virtual CMcResult | RunScript (const char *apName, const char *apData, const char *apParam, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
run script | |
virtual CMcResult | SetMode (const char *apName, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
switch module to mode 'apName' | |
virtual CMcResult | SetModeAuto (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
switch module to auto mode | |
virtual CMcResult | SetModeStep (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
switch module to step mode | |
virtual CMcResult | SetModeSetup (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
switch setup mode on | |
virtual CMcResult | ClrModeSetup (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
switch setup mode off | |
virtual CMcResult | SetOut (const char *apName, real64 arValue, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
virtual CMcResult | GetIO (const char *apName, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
virtual CMcResult | WaitBitEx (const char *apName, real64 arValue, real64 arTimeout, real64 arErrorType, real64 arErrorCode, real64 arErrorFlags, const char *apErrorText, real64 arErrorSend, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
waitbit | |
virtual CMcResult | WaitInp (const char *apName, real64 arValue, real64 arTimeout, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
waitbit non blocking | |
virtual CMcResult | WaitAdcNB (const char *apName, uint32 auSlope, real64 arValue, real64 arTimeout, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
waitadc non blocking | |
virtual CMcResult | WaitPosNB (const char *apName, uint32 auSlope, real64 arValue, real64 arTimeout, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
waitpos non blocking | |
virtual CMcResult | WaitAxis (const char *apName, uint32 auSlope, real64 arValue, real64 arTimeout, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
waitaxis non blocking | |
virtual CMcResult | WaitAxisEx (const char *apName, uint32 auSlope, real64 arValue, real64 arTimeout, uint32 auFlags, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
waitaxis non blocking | |
virtual CMcResult | CntInc (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
increment actual counter 0 | |
virtual CMcResult | CntDec (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
decrement actual counter 0 | |
virtual CMcResult | CntAdj (int32 aiValue, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
adjust actual counter 0 by aiValue | |
virtual CMcResult | SetCounter (uint32 auType, uint32 auNbr, uint32 auValue, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
set counter | |
virtual CMcResult | CronEnable (const char *apName, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
enable cron job apName | |
virtual CMcResult | CronDisable (const char *apName, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
disable cron job apName | |
virtual CMcResult | CronTouch (const char *apName, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
touch cron job apName | |
virtual CMcResult | CronCount (const char *apName, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
count cron job apName | |
virtual CMcResult | IsActionAllowed (const char *apScriptName, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
get fastload clearance | |
virtual CMcResult | ValveActivate (const char *apName, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
activate a valve | |
virtual CMcResult | ValveRelease (const char *apName, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
release a valve | |
CINOSMcModule * | GetParent () const |
get pointer to parent | |
virtual CINOSMcModule * | GetModule (uint32 auIndex) |
get pointer to child module auIndex | |
virtual CINOSMcModule * | GetModule (const char *apName) |
get pointer to child module apName | |
virtual CINOSMcModule * | FindSubModule (const char *apName) |
get pointer to child or sub-module apName (this may be expensive). | |
virtual CINOSMcGuardian * | GetGuardian () const |
get pointer to guardian | |
virtual CINOSMcBaseJob * | GetJob (const char *apName) |
get pointer to coordinator | |
virtual CINOSMcBaseScript * | GetScript (uint32 auNr) |
get pointer to script auNr | |
virtual CINOSMcBaseScript * | GetScript (const char *apName) |
get pointer to script apName | |
virtual void | RemScript (const char *apName) |
remove script apName | |
virtual CINOSMcData * | GetData (uint32 auNr) |
get pointer to data auNr | |
virtual CINOSMcData * | GetData (const char *apName) |
get pointer to data apName | |
virtual CINOSMcData * | GetData (const char *apPrefix, uint32 auNr) |
get pointer to data apPrefix (allows to iterate through a subfolder) | |
virtual CINOSMcData * | GetData (const char *apPrefix, const char *apName) |
get pointer to data apPrefix.apName | |
virtual bool | GetEmergency () |
get emergency | |
virtual uint32 | GetEmergencyDelay () |
get emergency delay [ms] | |
virtual void | EmergencyOnPurposeFollows () |
set emergency on purpose | |
virtual CINOSBit * | GetEmergencyInput () |
get pointer to emergency input | |
virtual bool | DoPostEmergencyMessage () |
return true if emergency postmessage requested | |
virtual bool | DoPostSTOMessage () |
return true if STO postmessage requested | |
virtual uint32 | GetSimLevel () |
get simlevel | |
virtual void | SetSimLevel (uint32 auSimLevel, bool abNonVolatile) |
set simlevel | |
virtual real64 | GetSlowMotion () |
get slowmotion factor | |
virtual void | SetSlowMotion (real64 arSlowMotion, bool abNonVolatile) |
set slowmotion factor | |
virtual real64 | GetProp (const char *apName, real64 arDefValue, CINOSTaskExMsg *apMsg) |
get module property | |
virtual void | GetProp (const char *apName, char *apBuffer, uint32 auLength, CINOSTaskExMsg *apMsg) |
get module property | |
virtual real64 | GetProp (const char *apName, real64 arDefValue, CINOSMcData *apData) |
get data property | |
virtual void | GetProp (const char *apName, const char *apDefault, char *apBuffer, uint32 auLength, CINOSMcData *apData) |
get data property | |
template<class T > | |
T * | GetResource (const char *apName) |
CINOSBit * | GetInpResource (const char *apName) |
CINOSBit * | GetOutResource (const char *apName) |
CINOSBit * | GetFlgResource (const char *apName) |
CINOSAdcChannel * | GetAdcResource (const char *apName) |
CINOSDacChannel * | GetDacResource (const char *apName) |
CINOSPosChannel * | GetPosResource (const char *apName) |
virtual CINOSPhysicalAxis * | GetAxisResource (const char *apName) |
tMsgId | AddInpResource (const char *apResName, const char *apImageName, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
tMsgId | AddOutResource (const char *apResName, const char *apImageName, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
tMsgId | AddAdcResource (const char *apResName, const char *apImageName, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
tMsgId | AddDacResource (const char *apResName, const char *apImageName, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
uint32 | RegisterHook (uintid &aoHookId, const char *apResName, void *apHandler, void *apObject, int32 aiOrder) |
Register a hook with the given parameters running in the context of the given resource handler. | |
uint32 | UnRegisterHook (uintid aoHookId, const char *apResName) |
Unregister a hook. | |
virtual CINCOObject * | GetResObj () |
get pointer to 'Res' inco folder | |
virtual uint32 | GetMode () |
get actual mode | |
virtual uint32 | GetCntValue (uint32 auType, uint32 auNbr) |
get counter Value | |
virtual const char * | GetModuleName () |
get module name | |
virtual void | AddCommand (const char *apName, uint32 auCode, CINCOProcedure *apProc) override |
add inco command | |
virtual void | AddCommand (CINOSTaskExMsg *apMsg, uint64 aChar, uint16 aKeyLevel, bool abRegisterInco=true) override |
add inco command | |
virtual void | AddCommand (const char *apName, uint32 auCode, uint32 auType=eMsgCmd) override |
add internal command | |
virtual void | RemCommand (const char *apName) override |
remove internal command | |
virtual void | AddChildCommand (const char *apModuleName, const char *apFunctionName, CINOSTaskExMsg *apCmdMsg, bool abRegisterInco=true) override |
add child command | |
virtual void | RemChildCommand (const char *apModuleName, const char *apFunctionName) override |
remove child command | |
virtual void | AddChildModule (const char *apModuleName) override |
add child module | |
virtual void | RemChildModule (const char *apModuleName) override |
remove child module | |
CINOSMcModule (const char *apName, const char *apParam) | |
module constructor | |
CINOSMcModule (const char *apName, const char *apType, const char *apParam) | |
module constructor | |
virtual | ~CINOSMcModule () |
module destructor | |
virtual void | PostCreate (void *apParent) override |
called after creation | |
virtual bool | PreDestroy (bool &bDeleteSelf) override |
called before destruction (return false if destruction not allowed) | |
virtual CINOSMcModuleRes * | AddResource (const char *apName, uint32 auType, uint32 auFlags=CINOSMcModuleRes::eResFlgMandatory, CINCOObject *apObj=0) |
add resource | |
virtual CINOSMcModuleRes * | AddResource (const char *apName, inosResName *apValue, uint32 auType, uint32 auFlags=CINOSMcModuleRes::eResFlgMandatory, CINCOObject *apObj=0) |
virtual CINOSMcModuleRes * | AddResource (const char *apName, void *apPtr, uint32 auType, uint32 auFlags=CINOSMcModuleRes::eResFlgMandatory, CINCOObject *apObj=0) |
virtual CINOSMcModuleRes * | AddResource (const char *apName, inosResName *apValue, void *apPtr, uint32 auType, uint32 auFlags=CINOSMcModuleRes::eResFlgMandatory, CINCOObject *apObj=0) |
virtual CINOSMcModuleRes * | iGetResource (const char *apName) |
virtual CINOSMcModuleRes * | iGetResource (uint32 auNumber) |
template<typename F > | |
void | iForEachResource (F &&f) |
virtual void | EnbResource (char *apName) |
virtual void | DisResource (char *apName) |
virtual CMcResult | PutMsg (CINOSTaskExMsg *apMsg, tMsgId aMsgId=0) override |
put message to queue and return command id | |
template<class T > | |
CINOSTaskEx::ERplId | WaitVar (T *apVal, ETypWait aeTypWait, real64 arValue, real64 arTimeout, real64 &arUsed) |
![]() | |
uint32 | GetState () |
get state | |
virtual void | SetState (uint32 auState) |
set state | |
bool | IsCmdBusy (uintptr auCmdCode) |
return true if task is actual command 'auCmdCode' busy | |
bool | IsCmdDeferred (uint32 auCmdCode) |
return true if task has a deferred command 'auCmdCode' | |
virtual bool | IsCmdAllowed (CINOSTaskExMsg *apMsg) |
const char * | GetParam () const |
get pointer to param | |
const char * | GetType () const |
get pointer to type | |
const char * | GetAliasName () const |
get pointer to alias name | |
void | SetAliasName (const char *apAlias) |
set alias name | |
virtual const char * | GetIncoName () |
get requested inco folder name | |
virtual const char * | GetTreeName () |
get requested binary tree name | |
uint32 | GetSourceId () |
get source id | |
CINOSTaskEx * | GetParent () const |
get parent | |
virtual CMcResult | Startup (real64 arStage) |
startup task (always asynchronous) | |
bool | GetCommand (const char *apName) const |
return true if command 'aName' is requested in params | |
bool | GetOption (const char *apName) const |
return true if option 'aName' is requested in params | |
bool | GetOption (const char *apBase, const char *apName) const |
return true if option 'apBase=aName' is requested in params | |
bool | GetOption (const char *apParams, const char *apBase, const char *apName) const |
return true if option 'apBase=aName' is requested in apParams | |
bool | GetOptionEx (const char *apBase) const |
bool | GetOptionStr (const char *apBase, char *apResult, uint32 auSize) const |
return option string belonging to apBase 'apBase=optionstring' | |
bool | GetOptionStr (const char *apParams, const char *apBase, char *apResult, uint32 auSize) const |
return option string belonging to apBase 'apBase=optionstring' | |
bool | GetOptionNbr (const char *apBase, uintnbr &auNumber) const |
return option number belonging to apBase 'apBase=number' | |
bool | GetOptionNbr (const char *apParams, const char *apBase, uintnbr &auNumber) const |
return option number belonging to apBase 'apBase=number' | |
bool | GetOption (uint32 auOption) const |
return true if option available | |
bool | GetFlag (const char *apName) const |
return true if flag 'aName' is requested in params | |
bool | GetFlag (uint64 auFlag) const |
return true if flag available | |
uint64 | GetFlags () const |
return all flags | |
bool | GetRequest (uint32 auRequest) const |
return true if request set | |
bool | GetCritical (uint32 auCritical) const |
return true if critical set | |
virtual CMcResult | SetFlag (const char *apName, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
set flag apName | |
virtual CMcResult | ClrFlag (const char *apName, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
clear flag apName | |
virtual CMcResult | StopMsg (tMsgId atMsgId, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
stop message | |
virtual CMcResult | SetIdleTimeout (uint32 auIdleTimeout, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
uint32 | GetIdleTimeout () const |
void | SetDispatchFlag (uint32 auFlag) |
void | ClrDispatchFlag (uint32 auFlag) |
clr dispatch flag. see SetDispatchFlag for further information | |
uint32 | GetDispatchFlag () const |
set dispatch flag. see SetDispatchFlag for further information | |
virtual uint32 | Shutdown (CINOSSync *apSync=DF_INOS_SYNCHRONOUS) override |
shutdown task | |
virtual tMsgId | PutCmd (uint32 auCommand) |
put command to queue and return command id | |
virtual CMcResult | PutMsgEx (CINOSTaskExMsg *apMsg, uint32 auFlags, tMsgId aMsgId=0) |
Put a message with flags to adjust behaviour. | |
virtual void | PutReply (CINOSTaskExMsg *apMsg, tMsgId aMsgId) |
put reply message to queue | |
virtual CINOSTaskQueue * | GetMsgQueue () |
get pointer to message queue | |
CINOSTaskExMsg * | GetActMsg () |
get pointer to actually handled message | |
virtual const CINOSTaskExMsg * | GetCommandMsg (const char *apName) |
get pointer to command apName or NULL if not found | |
virtual CINOSTaskExMsg * | CreateMsgFromCommand (const char *apName, CINOSSync *apSync=DF_INOS_ASYNCHRONOUS) |
create a new message from command name or NULL if command not found. To call a command directly the template method CallCommand shlould be used instead. | |
template<typename... ParamType> | |
CMcResult | CallCommand (const char *apName, ParamType... aParams, CINOSSync *apSync=DF_INOS_SYNCHRONOUS) |
calls a command given the command name. The function can be called using less than defined parameters, it then uses default parameters unless the parameter is defined to be mandatory. If the command is not found or called with wrong parameters a CMcResult with the according error is returned. | |
virtual const CINOSTaskExCmdHookBase * | GetCommandHook (const char *apName) |
get pointer to command hook apName or NULL if not found | |
virtual CINCOObject * | GetRegister (CINCOObject *apObject=0) |
get pointer to inco registration | |
virtual CINCOObject * | SetCmdObj (CINCOObject *apCmd) |
set pointer to 'Cmd' inco folder and return old one | |
virtual CINCOObject * | GetCmdObj () |
get pointer to 'Cmd' inco folder | |
virtual CINCOObject * | GetPropObj () |
get pointer to 'Prop' inco folder | |
virtual CINCOObject * | GetOptionsObj () |
get pointer to 'Options' inco folder | |
virtual CINCOObject * | GetFlagsObj () |
get pointer to 'Flags' inco folder | |
virtual CINCOObject * | GetRequestsObj () |
get pointer to 'Requests' inco folder | |
virtual CINCOObject * | GetCriticalsObj () |
get pointer to 'Criticals' inco folder | |
virtual CINCOObject * | GetActObj () |
get pointer to 'Act' inco folder | |
virtual CINCOObject * | GetStatObj () |
get pointer to 'Stat' inco folder | |
virtual void | AddProp (CINCOItem *apItem) |
add property to the 'Prop' folder | |
virtual void | AddProp (const char *apName) |
add object property to the 'Prop' folder | |
virtual void | AddProp () |
add object property to the 'Prop' folder | |
virtual void | AddProp (const char *apName, nvreal64 &aMember, real64 arDefault, real64 arMin, real64 arMax, const char *apUnit, uint32 auDigits, uint32 auCharactristics=defCharShowFix) |
add nvreal property to the 'Prop' folder | |
virtual void | AddProp (const char *apName, nvuint32 &aMember, uint32 auDefault, uint32 auMin, uint32 auMax, const char *apUnit, uint32 auCharacteristics=defCharShowDec) |
add nvuint32 property to the 'Prop' folder | |
virtual void | AddProp (const char *apName, nvstring &aMember, const char *apDefault="", const char *apComboData=NULL) |
add nvstring property to the 'Prop' folder | |
virtual void | AddProp (const char *apName, nvlstring &aMember, const char *apDefault="") |
add nvlstring property to the 'Prop' folder | |
virtual void | AddProp (const char *apName, nvbool &aMember, bool abDefault, uint32 auCharactristics=defCharShowDec) |
add nvbool property to the 'Prop' folder and register it as checkbox. | |
virtual void | RemProp (const char *apName) |
remove object property apName | |
virtual void | AddActual (CINCOItem *apItem) |
add actual to the 'Act' folder | |
virtual void | AddActual (const char *apName) |
add object property to the 'Act' folder | |
virtual void | AddActual () |
add object property to the 'Act' folder | |
virtual void | AddActual (const char *apName, nvreal64 &aMember, real64 arDefault, real64 arMin, real64 arMax, const char *apUnit, uint32 auDigits) |
add nvreal to the 'Act' folder | |
virtual void | AddActual (const char *apName, nvuint32 &aMember, uint32 auDefault, uint32 auMin, uint32 auMax, const char *apUnit, uint32 auCharacteristics=defCharShowDec) |
add nvuint32 to the 'Act' folder | |
virtual void | AddActual (const char *apName, nvstring &aMember, const char *apDefault=nullptr, const char *apComboData=nullptr) |
add nvstring to the 'Act' folder | |
virtual void | AddActual (const char *apName, nvlstring &aMember, const char *apDefault=nullptr) |
add nvlstring to the 'Act' folder | |
virtual void | AddActual (const char *apName, nvbool &aMember, bool abDefault, uint32 auCharactristics=defCharShowDec) |
add nvbool property to the 'Act' folder and register it as checkbox. | |
virtual void | RemActual (const char *apName) |
remove object actual apName | |
virtual CINOSTaskExMsg * | CreateMsg (CINOSTaskExMsg *apMsg, CINOSMcDataInst *apData, const char *apAlias) |
create message from apMsg | |
CINOSMcMessage * | GetMessageHndEx () |
get message handler | |
void | SetMessageHnd (CINOSMcMessage *apMessageHnd) |
set message handler | |
virtual CMcResult | PostMessage (uint32 auMsgType, uint32 auMsgCode, uint32 auFlags, CINOSMcData *apInfo=0) |
post message | |
virtual CMcResult | PostMessage (uint32 auMsgType, uint32 auMsgCode, uint32 auFlags, const char *apText, CINOSMcData *apInfo=0) |
post message | |
virtual CMcResult | ModifyMessage (tMsgId aiId, uint32 auMsgType, uint32 auMsgCode, uint32 auFlags, CINOSMcData *apInfo=0, const char *apText=nullptr) |
modify message | |
CINOSTaskEx (const char *apName, const char *apParam=0, uint32 aStackSize=defDefaultStackSize, uint32 aPriority=defLowestPriority, bool aFloatingPoint=true, uint32 aTimeSlice=defDefaultTimeSlice, bool aInterruptsDisabled=false) | |
constructor | |
CINOSTaskEx (const char *apName, const char *apType, const char *apParam=0, uint32 aStackSize=defDefaultStackSize, uint32 aPriority=defLowestPriority, bool aFloatingPoint=true, uint32 aTimeSlice=defDefaultTimeSlice, bool aInterruptsDisabled=false) | |
constructor | |
virtual | ~CINOSTaskEx () |
destructor | |
int | operator< (CINOSTaskEx &aTaskEx) |
binary tree operators | |
int | operator== (CINOSTaskEx &aTaskEx) |
int | operator< (const char *aName) |
int | operator== (const char *aName) |
virtual void | MsgDonePnd (CINOSTaskExMsg *apMsg, tMcAppError aAppError=0) |
message done (and set 'pending' flag) | |
virtual void | MsgDonePnd (CINOSTaskExMsg *apMsg, ERplId aRplId, tMcAppError aAppError=0) |
message done (and set 'pending' flag) | |
virtual void | MsgInComplete (CINOSTaskExMsg *apMsg, tMcAppError aAppError=0) |
message incomplete | |
virtual void | MsgIgnored (CINOSTaskExMsg *apMsg, tMcAppError aAppError=0) |
message ignored | |
virtual void | MsgPaused (CINOSTaskExMsg *apMsg, tMcAppError aAppError=0) |
message paused. Deprecated! | |
virtual void | MsgStopped (CINOSTaskExMsg *apMsg, tMcAppError aAppError=0) |
message stopped | |
virtual void | MsgCanceled (CINOSTaskExMsg *apMsg, tMcAppError aAppError=0) |
message canceled | |
virtual void | MsgRejected (CINOSTaskExMsg *apMsg, tMcAppError aAppError=0) |
message rejected | |
virtual void | MsgFailed (CINOSTaskExMsg *apMsg, tMcAppError aAppError=0) |
message failed | |
virtual void | MsgError (CINOSTaskExMsg *apMsg, tMcAppError aAppError) |
message error | |
virtual void | MsgFatal (CINOSTaskExMsg *apMsg, tMcAppError aAppError) |
message fatal error | |
virtual tMsgId | MsgDefer (CINOSTaskExMsg *apMsg, void *apHandler=0, void *apObject=0, bool abHandlesCommands=false) |
defer message and return according MsgId | |
virtual tMsgId | MsgDefer (CINOSTaskExMsg *apMsg, tMsgId aMsgId, void *apHandler=0, void *apObject=0, bool abHandlesCommands=false) |
virtual void | AddCommand (CINOSTaskExMsg *apMsg, CINCOObject *apMsgCmdObj) |
add inco command | |
virtual void | AddParam (const char *apName, real64 arValue, real64 arMin, real64 arMax, const char *apUnit, uint32 auChar, uint32 auFlags=0) |
add param to command. You can use REAL64MIN/MAX to allow all possible values. | |
virtual void | AddParam (const char *apName, const char *apValue, uint32 auFlags=0) |
add param to command | |
virtual void | AddParam (const char *apName, const char *apValue, const char *apComboData, uint32 auFlags=0) |
add string param with combobox data | |
virtual void | AddParam (const char *apName, const char *apUnit, uint32 auValue, uint32 auMin, uint32 auMax, uint32 auChar, uint32 auFlags=0) |
Add uint32 parameter to command. You can use UINT32MIN/MAX to allow all possible values. | |
virtual void | AddParam_int32 (const char *apName, const char *apUnit, int32 aiValue, int32 aiMin, int32 aiMax, uint32 auChar, uint32 auFlags=0) |
Add int32 parameter to command. You can use INT32MIN/MAX to allow all possible values. | |
virtual void | AddParam_uint64 (const char *apName, const char *apUnit, uint64 auValue, uint64 auMin, uint64 auMax, uint32 auChar, uint32 auFlags=0) |
Add uint64 parameter to command. You can use UINT64MIN/MAX to allow all possible values. | |
virtual void | AddParam_int64 (const char *apName, const char *apUnit, int64 aiValue, int64 aiMin, int64 aiMax, uint32 auChar, uint32 auFlags=0) |
Add int64 parameter to command. You can use INT64MIN/MAX to allow all possible values. | |
virtual void | AddParam (const char *apName, const char *apComboData, uint32 auValue, uint32 auMin, uint32 auMax, const char *apUnit, uint32 auChar, uint32 auFlags=0) |
Add combo box parameter to command. You can use UINT32MIN/MAX to allow all possible values. | |
virtual void | AddParam (const char *apName, bool abValue, uint32 auChar, uint32 auFlags=0) |
Add parameter of type bool to command. | |
template<typename T > | |
void | AddParam (CINCOItem *apItem, T aValue, uint32 auFlags=0) |
void | ProcedureArgCheck (CINCOObject &aObject, const char *apParamName, const uint32 auExpectedIncoType) |
virtual void | AddEllipsis () |
Add ellipsis to command. | |
void | RegisterCommand (CINOSTaskExCmdBase *apCommand) |
register a command that will be added at startup (depending in the option) | |
void | RegisterHook (CINOSTaskExCmdHookBase *apHook) |
register a command hook which can be set to a command later | |
![]() | |
CINOSTask (char *apName=nullptr, uint32 auStackSize=defDefaultStackSize, uint32 auPriority=DF_INOS_TASK_PRIO_LOWEST, bool abFloatingPoint=true, uint32 auTimeSlice=defDefaultTimeSlice, bool abInterruptsDisabled=false, void *apHandler=0, void *apObject=0) | |
Create a task with given properties. One needs to Resume the task after creation to get it running. | |
CINOSTask (std::function< void(void *)> aFunction, void *apParam=nullptr, uint8 auPriority=DF_INOS_TASK_PRIO_LOWEST) | |
Create a task with given properties. One needs to Resume the task after creation to get it running. | |
CINOSTask (const char *apName, std::function< void(void *)> aFunction, void *apParam=nullptr, uint8 auPriority=DF_INOS_TASK_PRIO_LOWEST) | |
Create a task with given properties. One needs to Resume the task after creation to get it running. | |
virtual | ~CINOSTask () |
Destroy task. | |
virtual uint32 | Join () |
Join task or in other words, wait till it terminates. | |
virtual void | Detach () |
Detach task from parent. One uses this method if one doesn't want this task to be shut down if the parent shuts down. | |
virtual void | Exit () |
Terminate myself. Exit code is INOS_OK or the code previously set with SetExitCode. | |
virtual void | Exit (uint32 auExitCode) |
Terminate myself. | |
virtual void | SetExitCode (uint32 auExitCode) |
Set exit code. | |
virtual uint32 | GetExitCode () |
Get exit code. | |
virtual bool | CheckShutdown () |
Check if a shutdown is pending. | |
virtual void | SetSuspendHook (void *apSuspendHook) |
Set Suspend hook. | |
virtual void | ClrSuspendHook () |
Clear Suspend hook. | |
virtual void * | GetSuspendHook () |
Get Suspend hook if any. | |
INOS_INLINE ETskType | GetTskType () |
Get task type. | |
INOS_INLINE ETskType | SetTskType (ETskType aeType) |
Set task type. | |
Static Public Member Functions | |
static CINOSMcModule * | FindModule (const char *apName) |
get pointer global module apName (this may be expensive). | |
static CINOSMcModule * | GetMachine (const char *apName) |
static CINOSMcModule * | GetMachine (uint32 auIndex) |
static uint32 | CreateMachine (CINOSMcModule *&apNewModule, const char *apName, const char *apType, const char *apParam) |
static uint32 | DestroyMachine (const char *apName) |
static uint32 | ShutdownRequest () |
static constexpr int | GetLastCmd () |
return last mcmodule command id | |
static constexpr int | GetLastUsr () |
return last mcmodule user id | |
![]() | |
static tMsgId | GetMsgId () |
get system wide unique message id | |
static tMsgId | GetMsgId (uint32 auId, uint32 auMask) |
static constexpr int | GetLastCmd () |
return last taskex command id | |
static constexpr int | GetLastUsr () |
return last taskex user id | |
static CINOSHook * | AddMsgDoneHook (void *apHandler, void *apObject=NULL) |
Add a hook to call some member function when MsgDone() gets called. This function is thread-safe. | |
static void | RemoveMsgDoneHook (CINOSHook *apHook) |
Remove a previously added MsgDone() hook. This function is thread-safe. | |
static uint32 | EncodeReplyCode (uint32 auReply, tMcAppError aAppError) |
Public Attributes | |
TINOSTaskExCmdMsg< CINOSMcModule, const char *, bool > | SetItems |
Sets items (Prop, Act, Res etc.) of a module. Setting items of a sub-module is not allowed. | |
Protected Types | |
enum | { eLcSoff , eLcSon , eLcSdown } |
Protected Member Functions | |
virtual bool | DispatchCmd (CINOSTaskExMsg *apMsg) override |
dispatch command message | |
virtual bool | DispatchTmd (CINOSTaskExMsg *apMsg) override |
dispatch triggered message | |
virtual bool | DispatchUser (CINOSTaskExMsg *apMsg) override |
dispatch user message | |
virtual bool | DispatchEvent (CINOSTaskExMsg *apMsg) override |
dispatch event message | |
virtual bool | DispatchReply (CINOSTaskExMsg *apReply) override |
dispatch reply | |
virtual bool | DispatchInternal (CINOSTaskExMsg *apMsg) override |
dispatch internal message | |
virtual void | AdjTrigger (CINOSTaskExMsg *apMsg, real64 arCmdTime) |
adjust trigger | |
virtual void | AdjTrigger (CINOSTaskExMsg *apMsg, CINOSBaseAxis *m_pAxis, real64 arStart, real64 arEnd, const char *apParam) |
adjust trigger | |
virtual void | iStartup (CINOSTaskExMsg *apMsg) override |
internal startup task | |
virtual void | iStartup (real64 arStage) override |
internal startup task | |
virtual bool | iPostStartup () override |
internal post startup | |
virtual void | iStartupDone () |
virtual void | iShutdown (CINOSTaskExMsg *apMsg) override |
internal shutdown task | |
virtual void | iCheckRes (CINOSTaskExMsg *apMsg) |
internal check resources | |
virtual void | iLinkDown (CINOSTaskExMsg *apMsg) |
link down | |
virtual void | iEmgSet (CINOSTaskExMsg *apMsg) |
internal switch core | |
virtual void | iEmgClr (CINOSTaskExMsg *apMsg) |
emergency cleared | |
virtual bool | PreDispatchMsg (CINOSTaskExMsg *apMsg) override |
Pre dispatcher. | |
virtual void | PostEmergency () |
post emergency message | |
virtual CMcResult | PostEmergencyStopMessage () |
post emergency stop message | |
virtual void | iOn (CINOSTaskExMsg *apMsg) |
internal on | |
virtual void | iiOn (CINOSTaskExMsg *apMsg) |
very internal on | |
virtual void | irplOn (CINOSTaskExMsg *apMsg, CINOSTaskExMsg *apRpl) |
internal on reply | |
virtual void | iOff (CINOSTaskExMsg *apMsg) |
internal off | |
virtual void | iiOff () |
very internal off | |
virtual void | irplOff (CINOSTaskExMsg *apMsg, CINOSTaskExMsg *apRpl) |
internal off reply | |
virtual void | iSafe (CINOSTaskExMsg *apMsg) |
internal safe | |
virtual void | irplSafe (CINOSTaskExMsg *apMsg, CINOSTaskExMsg *apRpl) |
internal safe reply | |
virtual void | iInit (CINOSTaskExMsg *apMsg) |
internal init | |
virtual void | irplInit (CINOSTaskExMsg *apMsg, CINOSTaskExMsg *apRpl) |
internal init reply | |
virtual void | iHome (CINOSTaskExMsg *apMsg) |
internal home | |
virtual void | irplHome (CINOSTaskExMsg *apMsg, CINOSTaskExMsg *apRpl) |
internal home reply | |
virtual void | iRecover (CINOSTaskExMsg *apMsg) |
internal recover | |
virtual void | irplRecover (CINOSTaskExMsg *apMsg, CINOSTaskExMsg *apRpl) |
internal recover reply | |
virtual void | iStart (CINOSTaskExMsg *apMsg) |
internal start | |
virtual void | iStop (CINOSTaskExMsg *apMsg) |
internal stop | |
virtual void | iiStop () |
internal stop | |
virtual void | irplStop (CINOSTaskExMsg *apMsg, CINOSTaskExMsg *apRpl) |
internal stop reply | |
virtual void | iPause (CINOSTaskExMsg *apMsg) |
internal pause | |
virtual void | irplPause (CINOSTaskExMsg *apMsg, CINOSTaskExMsg *apRpl) |
internal pause reply | |
virtual void | iResume (CINOSTaskExMsg *apMsg) |
internal resume | |
virtual void | iCancel (CINOSTaskExMsg *apMsg) |
internal cancel | |
virtual void | iiCancel (bool abHandleOffRequest=true) |
internal cancel | |
virtual void | irplCancel (CINOSTaskExMsg *apMsg, CINOSTaskExMsg *apRpl) |
internal cancel reply | |
virtual void | iRetry (CINOSTaskExMsg *apMsg) |
internal retry | |
virtual void | iConfirm (CINOSTaskExMsg *apMsg) |
internal confirm | |
virtual void | iManual (CINOSTaskExMsg *apMsg) |
internal manual | |
virtual void | iPrepare (CINOSTaskExMsg *apMsg) |
internal prepare | |
virtual void | iBackup (CINOSTaskExMsg *apMsg) |
internal backup | |
virtual void | iRestore (CINOSTaskExMsg *apMsg) |
internal restore | |
virtual void | irplRestore (CINOSTaskExMsg *apMsg, CINOSTaskExMsg *apRpl) |
internal restore reply | |
virtual void | iCreateSubModule (CINOSTaskExMsg *apMsg) |
internal create sub module | |
virtual uint32 | iCreateSubModule (const char *apName, const char *apType, const char *apParam) |
internal create sub module | |
virtual void | iDestroySubModule (CINOSTaskExMsg *apMsg) |
internal destroy sub module | |
virtual uint32 | iDestroySubModule (const char *apName) |
internal destroy sub module | |
virtual void | iSetItems (CINOSTaskExMsg *apMsg) |
internal set items | |
virtual void | iCreateData (CINOSTaskExMsg *apMsg) |
internal create data | |
virtual void | iDestroyData (CINOSTaskExMsg *apMsg) |
internal destroy data | |
virtual void | iMoveData (CINOSTaskExMsg *apMsg) |
internal move data | |
virtual void | iMoveDataInt (CINOSTaskExMsg *apMsg) |
internal move data | |
virtual void | iCreateJob (CINOSTaskExMsg *apMsg) |
internal create script | |
virtual void | iDestroyJob (CINOSTaskExMsg *apMsg) |
internal destroy Job | |
virtual void | iCreateScript (CINOSTaskExMsg *apMsg) |
internal create script | |
virtual void | iDestroyScript (CINOSTaskExMsg *apMsg) |
internal destroy script | |
virtual void | iRunJob (CINOSTaskExMsg *apMsg) |
internal runjob | |
virtual void | irplRunJob (CINOSTaskExMsg *apMsg, CINOSTaskExMsg *apRpl) |
internal run job reply | |
virtual void | iRunScript (CINOSTaskExMsg *apMsg) |
internal run script | |
virtual void | irplRunScript (CINOSTaskExMsg *apMsg, CINOSTaskExMsg *apRpl) |
internal run script for coordinator | |
virtual void | iSetMode (CINOSTaskExMsg *apMsg) |
internal run registered lua function | |
virtual void | iSetModeAuto (CINOSTaskExMsg *apMsg) |
internal set auto mode | |
virtual void | iSetModeStep (CINOSTaskExMsg *apMsg) |
internal set step mode | |
virtual void | iSetModeSetup (CINOSTaskExMsg *apMsg) |
internal set setup mode | |
virtual void | iClrModeSetup (CINOSTaskExMsg *apMsg) |
internal clr setup mode | |
virtual void | iSetMode (const char *apName) |
internal set mode | |
virtual bool | iCheckSetupMode () |
internal check setup mode | |
virtual void | iSetOut (CINOSTaskExMsg *apMsg) |
internal setout | |
virtual void | iGetIO (CINOSTaskExMsg *apMsg) |
internal setout | |
virtual void | iWaitBitEx (CINOSTaskExMsg *apMsg) |
internal waitbit | |
virtual void | iWaitInp (CINOSTaskExMsg *apMsg) |
internal non blocking waitbit | |
virtual void | iWaitAdc (CINOSTaskExMsg *apMsg) |
handle for internal non blocking waitbit | |
virtual void | iWaitPos (CINOSTaskExMsg *apMsg) |
internal non blocking waitbit | |
virtual void | iWaitAxis (CINOSTaskExMsg *apMsg) |
internal non blocking wait axis | |
void | WaitCond (TINOSMcModuleCondFunc aFunc, TINOSMcModuleCondHandler aSuccessFunc, TINOSMcModuleCondHandler aTimeoutFunc, real64 arTimeout=0.0, real64 arSimTimeout=0.0) |
Wait on arbitrary condition or timeout. | |
tMsgId | MsgDeferWait (CINOSTaskExMsg *apMsg, CINOSMcModuleWaitObj *apWaitObj, real64 arTimeout=0.0) |
defer message until wait condition fulfilled or timeout [ms] expired | |
virtual void | ihndlWait (CINOSTaskExMsg *apMyMsg, CINOSTaskExMsg *apNewMsg) |
handle for deferred wait messages | |
virtual void | iWaitTimeout (CINOSTaskExMsg *apMsg) |
internal wait timeout | |
virtual void | iCntInc (CINOSTaskExMsg *apMsg) |
internal inc counter | |
virtual void | iCntDec (CINOSTaskExMsg *apMsg) |
internal dec counter | |
virtual void | iCntAdj (CINOSTaskExMsg *apMsg) |
internal adj counter | |
virtual void | iSetCounter (CINOSTaskExMsg *apMsg) |
internal set counter | |
virtual void | iCronEnable (CINOSTaskExMsg *apMsg) |
internal enable cron job | |
virtual void | iCronDisable (CINOSTaskExMsg *apMsg) |
internal disable cron job | |
virtual void | iCronDisableAll () |
internal disable all cron job | |
virtual void | iCronTouch (CINOSTaskExMsg *apMsg) |
internal touch cron job | |
virtual void | iCronCount (CINOSTaskExMsg *apMsg) |
internal count cron job | |
virtual void | iIsActionAllowed (CINOSTaskExMsg *apMsg) |
get clearance to fastload a script | |
virtual void | iValveActivate (CINOSTaskExMsg *apMsg) |
activate a valve | |
virtual void | iValveRelease (CINOSTaskExMsg *apMsg) |
release a valve | |
virtual void | iGetResource (CINOSTaskExMsg *apMsg) |
internal get resource | |
virtual void | iOnCntSet (CINOSTaskExMsg *apMsg) |
event handler 'OnCntSet' | |
virtual void | iOnCntInc (CINOSTaskExMsg *apMsg) |
event handler 'OnCntInc' | |
virtual void | iOnCntDec (CINOSTaskExMsg *apMsg) |
event handler 'OnCntDec' | |
virtual void | iOnCntSet (uint32 auType, uint32 auNbr, uint32 auVal, uint64 auTb) |
counter handler | |
virtual void | iSetCntCmd (uint32 auNbr, uint32 auVal) |
set cmd counter | |
virtual void | iOnMsgSet (CINOSTaskExMsg *apMsg) |
event handler 'OnMsgSet' | |
virtual void | iOnMsgAck (CINOSTaskExMsg *apMsg) |
event handler 'OnMsgAck' | |
virtual void | iOnSlowMotionChanged (CINOSTaskExMsg *apMsg) |
event handler 'iOnSlowMotionChanged' | |
virtual void | iOnSimLevelChanged (CINOSTaskExMsg *apMsg) |
event handler 'iOnSimLevelChanged' | |
virtual void | iOnSimLevelChanged (uint32 auOldLevel, uint32 auNewLevel) |
event handler 'iOnSimLevelChanged' | |
virtual void | MsgDone (CINOSTaskExMsg *apMsg, uint32 auResult=0) override |
message done | |
virtual void | MsgDone (CINOSTaskExMsg *apMsg, ERplId aRplId, uint32 auResult=0) override |
message done | |
virtual void | iUpdate () |
update state | |
virtual void | SetFlag (uint64 auFlag, bool abUpdateState=false) override |
set flag | |
virtual void | ClrFlag (uint64 auFlag, bool abUpdateState=false) override |
clr flag | |
virtual bool | IsModeAllowed (const char *apMode) |
return true if switching to aMode is allowed | |
virtual void | iStepCanceled (CINOSTaskExMsg *apMsg) |
step command canceled | |
virtual void | iStepStopped (CINOSTaskExMsg *apMsg) |
step command stopped | |
virtual void | iStepSkipped (CINOSTaskExMsg *apMsg) |
step command skipped | |
virtual void | iMsgRejected (CINOSTaskExMsg *apMsg) |
message rejected | |
void | iAddInpResource (CINOSTaskExMsg *apMsg) |
see AddInpResource | |
void | iAddOutResource (CINOSTaskExMsg *apMsg) |
see AddOutResource | |
void | iAddAdcResource (CINOSTaskExMsg *apMsg) |
see AddAdcResource | |
void | iAddDacResource (CINOSTaskExMsg *apMsg) |
see AddDacResource | |
virtual ERplId | WaitMs (real64 arTime) |
Synchronous wait for delay. | |
virtual ERplId | WaitBit (CINOSBit *apBit, uint32 auValue, real64 arTimeout, real64 &arUsed) |
internal wait for bit and return reply code (eRplOk/Stopped/Canceled/Error) | |
virtual ERplId | WaitAdc (CINOSAdcChannel *apAdc, ETypWait aeTypWait, real64 arValue, real64 arTimeout, real64 &arUsed) |
internal wait for adc and return reply code (eRplOk/Stopped/Canceled/Error) | |
virtual ERplId | WaitPos (CINOSPosChannel *apPos, ETypWait aeTypWait, int32 aiValue, real64 arTimeout, real64 &arUsed) |
internal wait for pos and return reply code (eRplOk/Stopped/Canceled/Error) | |
virtual ERplId | WaitPos (CINOSPhysicalAxis *apAxis, ETypWait aeTypWait, real64 arValue, real64 arTimeout, real64 &arUsed) |
internal wait for axis pos and return reply code (eRplOk/Stopped/Canceled/Error) | |
virtual ERplId | WaitVar (CINOSTaskExMsg *apMsg, const char *apName, ETypWait aeTypWait, real64 arValue, real64 arTimeout, real64 &arUsed) |
internal wait for variable and return reply code (eRplOk/Stopped/Canceled/Error) | |
template<class T > | |
ERplId | WaitVar (T *apVar, ETypWait aeTypWait, real64 arValue, real64 arTimeout, real64 &arUsed) |
internal wait for variable and return reply code (eRplOk/Stopped/Canceled/Error) | |
virtual bool | TestBit (const char *apName) |
internal test bit with resource name 'apName' | |
virtual void | SetBit (const char *apName) |
internal set bit with resource name 'apName' | |
virtual void | ClrBit (const char *apName) |
internal test bit with resource name 'apName' | |
void | SetModuleBase (const char *apAllowedBases) |
void | AddInp (CINOSMcModuleRes *apInp) |
add input | |
void | AddOut (CINOSMcModuleRes *apOut) |
add output | |
uint32 | CreateModule (const char *apName, const char *apType, const char *apParam) |
create module | |
uint32 | DestroyModule (const char *apName) |
destroy module | |
CINOSContainer< CINOSMcData > * | GetDataContainer () |
get pointer to data container | |
virtual void | JobCounterInc () |
virtual void | JobCounterDec () |
void | DisableModuleHlpHook () |
disable module helper hook | |
void | EnableModuleHlpHook () |
enable module helper hook | |
virtual void | iModuleHlpHook () |
module helper hook | |
virtual void | OnTargetError () |
target error handler | |
DECLARE_DYNAMIC (CINOSMcModule) | |
dynamic object handling | |
![]() | |
void | Create () |
do main creation work | |
virtual void | Action () override |
main action | |
virtual void | PostDispatchMsg () |
PostDispatchMsg. | |
virtual bool | DispatchSub (CINOSTaskExMsg *apMsg) |
dispatch sub message | |
virtual bool | DispatchMessage (CINOSTaskExMsg *apMsg) |
dispatch message message | |
virtual bool | DispatchOther (CINOSTaskExMsg *apMsg) |
dispatch other message | |
virtual void | iFailure (CINOSTaskExMsg *apMsg) |
internal command handling failure | |
virtual uint32 | iAddRegisteredCommands () |
add registered commands (done between startup and post startup) | |
virtual void | iShutdownRequest (CINOSTaskExMsg *apMsg) |
virtual void | iSetFlag (CINOSTaskExMsg *apMsg) |
internal switch core | |
virtual void | iiSetFlag (const char *apName) |
virtual void | iClrFlag (CINOSTaskExMsg *apMsg) |
internal clear flag | |
virtual void | iStopMsg (CINOSTaskExMsg *apMsg) |
stop message | |
virtual void | iSetIdleTimeout (CINOSTaskExMsg *apMsg) |
internal set idle timeout | |
virtual void | iHandleIdleTimeout () |
internal handle idle timeout | |
void | iCheckIdleTimeout () |
internal check idle timeout | |
virtual void | iCancelDeferred () |
internal cancel all deferred messages | |
virtual void | iAddCommand (CINOSTaskExMsg *apMsg) |
internal add command | |
virtual void | iRemCommand (CINOSTaskExMsg *apMsg) |
internal add command | |
virtual void | iDeleteCommand (CINOSTaskExMsg *apMsg) |
internal delete command (only used for commands of type call) | |
virtual void | iGetCommands (CINOSTaskExMsg *apMsg) |
internal get commands | |
virtual void | iGetProp (CINOSTaskExMsg *apMsg) |
internal get property | |
virtual void | iSetProp (CINOSTaskExMsg *apMsg) |
internal set property | |
virtual void | iAddProp (CINOSTaskExMsg *apMsg) |
internal set property | |
virtual void | iGetActual (CINOSTaskExMsg *apMsg) |
internal get actual | |
virtual void | iSetActual (CINOSTaskExMsg *apMsg) |
internal set actual | |
virtual void | iAddActual (CINOSTaskExMsg *apMsg) |
reply to actual message | |
virtual void | iMessageAdd (CINOSTaskExMsg *apMsg) |
internal message add | |
virtual void | iMessageRemove (CINOSTaskExMsg *apMsg) |
internal message remove | |
virtual void | iMessageModify (CINOSTaskExMsg *apMsg) |
internal message modify | |
virtual void | iMessageAcknowledge (CINOSTaskExMsg *apMsg) |
internal message acknowledge | |
void | Reply (CINOSTaskExMsg *apMsg, uint32 auReply, tMcAppError aAppError=0) |
reply to actual message | |
template<class T > | |
void | ReplyParam (uint32 auReply, T) |
reply to actual message with param | |
virtual void | SetTreeName (const char *apTreeName) |
set requested binary tree name | |
virtual const char * | GetStateText () |
return actual state text | |
virtual void | MsgDone (tMsgId aMsgId, tMcAppError aAppError=0) |
message done (used for deferred messages) | |
virtual void | iUsrMsgDone (CINOSTaskExMsg *apMsg) |
internal user message done, used to handle message dones from other | |
virtual void | FlushTmd (tMsgId aId=0) |
remove triggered messages auId of type eMsgCmd or all if auId==0 | |
virtual void | _AddCommand (CINOSTaskExMsg *apMsg, CINCOObject *apMsgCmdObj, int16 aiOrder=0) |
add inco command | |
virtual void | AdjTrigger (CINOSTaskExMsg *apMsg) |
adjust trigger | |
CINOSTaskExDeferredMsg * | GetDeferredMsg (tMsgId auReplyId) |
get pointer to deferred message with given reply id | |
void | RemDeferredMsg (CINOSTaskExDeferredMsg *apDef) |
remove deferred message from list | |
CINOSTaskExMsg * | GetDeferredMsgCmd (uint32 auCmdCode) |
get pointer to deferred message with given command code | |
char * | GetMsgName (CINOSTaskExMsg *apMsg) |
get message name | |
void | SetParent (CINOSTaskEx *apParent) |
set parent pointer | |
void | MptHook () |
measure hook | |
void | NvUpdate () |
nvram update | |
virtual void | iNvUpdate (CINOSTaskExMsg *apMsg) |
virtual void | SetRequest (uint32 auRequest) |
set request | |
virtual void | ClrRequest (uint32 auRequest) |
clr request | |
void | SetCritical (uint32 auCritical) |
set critical | |
void | ClrCritical (uint32 auCritical) |
clr critical | |
virtual CINOSSync * | GetSync () override |
get task sync object | |
virtual void | SetCallResult (CMcResult aResult) override |
set sync call result | |
virtual CMcResult | GetCallResult () override |
get sync call result | |
void | RequestCritical () |
request critical section | |
void | ReleaseCritical () |
release critical section | |
bool | AddToInputQueue (CINOSTaskExMsg *apMsg, uint32 auFlags=0) |
virtual void | MsgCompleted (CINOSTaskExMsg *&apMsg) |
uint8 | GetRequestedPriority () |
get requested priority | |
void | SetRequestedPriority (uint8 auPrio) |
set requested priority | |
void | HandleTriggerMsg (CINOSTaskExMsg *apMsg, EDispatchStyle aeDispStyle) |
handle message with a trigger | |
CINOSTaskExMsg * | GetTmpMsg () |
Get temporary message (used for subclasses overriding AddCommand) | |
Protected Attributes | |
tMsgId | m_uEmergencyMessageId |
emergency message id | |
tMsgId | m_uSTOMessageId |
sto message id | |
bool | m_bUniqueResourceNaming |
nvstring | m_cJobName |
module properties | |
nvstring | m_cJobParam |
job param | |
inosName32 | m_cMode |
actual selected mode | |
uint32 | m_uMode |
actual selected mode | |
int32 | m_iSimLevel |
simulation level | |
nvuint32 | m_uSimLevel |
nvreal64 | m_rSlowMotion |
slowmotion factor | |
nvreal64 | m_rSlowMotionSetup |
setup slowmotion factor | |
nvreal64 | m_rOnDelay |
ondelay [ms] | |
nvuint32 | m_uAutoInit |
auto init [yes/no] | |
uint32 | m_uActJobs |
number of actual running scripts/jobs | |
uint32 | m_uEmgDelay |
emergency delay | |
uint32 | m_uEmgFilter |
emergency filter | |
nvstring | m_cActJobName |
module actuals | |
nvuint32 | m_uActJobState |
act job state | |
nvuint32 | m_uActJobResult |
act job result | |
nvlstring | m_cActScriptName |
paused script name | |
nvuint32 | m_uActChecksum |
paused checksum | |
nvuint32 | m_uActCmdId |
paused cmd id | |
tMsgId | m_uActJobId |
paused job | |
uint32 | m_uCntNbr |
number of counters | |
nvuint32 * | m_pCntCmd [8] |
commanded counters | |
nvuint32 * | m_pCntAct [8] |
actual counters | |
nvuint32 * | m_pCntBad [8] |
bad counters | |
nvuint32 * | m_pCntUph [8] |
uph [units/hour] | |
nvuint32 * | m_pCntUphType [8] |
uph type [0-standard, 1-ignore first and last, 2-start/average] | |
nvreal64 * | m_pCntUphFactor [8] |
uph factor [*] | |
nvuint32 * | m_pCntUphStart [8] |
uph start | |
nvuint32 * | m_pCntUphAverage [8] |
uph average | |
nvreal64 * | m_pCntTim [8] |
cycle time [ms] | |
nvreal64 * | m_pCntLft [8] |
left time [sec] | |
uint64 * | m_pCntTimeBase [8] |
timebase of last count | |
uint8 | m_uCntTimeBaseIndex [8] |
timebase index | |
inosName | m_cCntUnit [8] |
unit buffers | |
CINOSMcValves * | m_pValves |
pointer to valves | |
CINOSMcDataInst * | m_pOffDataInst = nullptr |
pointer to off script data instance | |
enum CINOSMcModule:: { ... } | m_eLcState |
uint8 | m_uLcMask |
bus mask | |
bool | m_bResRegistred |
resources registred | |
CINOSBit * | m_pDiEmergency |
pointer to emergency input | |
uint32 | m_uTgtErrorFlags = 0 |
![]() | |
CINCOObject * | m_pRegister |
pointer to my inco registration | |
uint32 | m_uOptions |
task options | |
std::atomic< uint64 > | m_uFlags |
task flags | |
uint32 | m_uRequests |
task requests | |
uint32 | m_uCriticals |
task critical sections | |
uint32 | m_uState |
task state | |
CINCOObject * | m_pNvInitObj |
pointer to temporary nvobj | |
uint32 | m_uPropOrder |
prop folder order | |
uint32 | m_uActOrder |
act folder order | |
Static Protected Attributes | |
static CINOSContainer< CINOSMcModule > * | m_pMachine |
static CINOSMutex | s_MachineMutex |
static bool | s_bRegisterInContainer |
Friends | |
class | CINOSMcModuleRes |
class | CINOSMcModuleWaitObj |
class | CINOSMcValve |
class | CINOSMcFastLoad |
class | CINOSMcCron |
return true if command with id is done (currently just used by cron | |
void | _INI_0000_CINOSMcModule () |
void | _INI_0300_CINOSMcModule () |
void | _INI_0500_CINOSMcModule () |
void | _INI_1000_CINOSMcModule () |
int | l_add_command (lua_State *L) |
Additional Inherited Members | |
![]() | |
static uint32 | iSetIncoItemsFromParamStruct (CINCOItem *apIncoItem, long alOffset, CINOSTaskExMsgParam *apParams, bool abOverwrite, inosName128 &oErrorItemName) |
Helper function for commands that set INCO items from a parameter stucture. | |
static void | INCOItemToMessageResult (CINCOItem *apItem, const char *apParentPath, CINOSTaskExMsg *apMsg) |
Add value of INCO item to results of apMsg. | |
static void | INCOItemsToMessageResults (CINCOItem *apItem, const char *apParentPath, CINOSTaskExMsg *apMsg) |
Add the value of the INCO item apItem and all its children (if any) as named results to the message (apMsg). | |
static void | CallMsgDoneHooks (CINOSTaskExMsg *apMsg, ERplId aRplId, tMcAppError aAppError) |
Call hooks to notify observers about MsgDone, passing all arguments for inspection. This function is thread-safe. | |
tMsgId CINOSMcModule::AddAdcResource | ( | const char * | apResName, |
const char * | apImageName, | ||
CINOSSync * | apSync = DF_INOS_SYNCHRONOUS |
||
) |
Add a 'analog input' resource. This function offers an alternative to adding resources at module creation time.
apResName | The name of the resource. The name should NOT include any "Adc.". This function takes care to put the resource into "Adc." object if the "UnR" option is active for this module. |
apImageName | The name of the resource in the Image. |
|
overridevirtual |
add child command
Reimplemented from CINOSTaskEx.
add child module
Reimplemented from CINOSTaskEx.
|
overridevirtual |
add inco command
Reimplemented from CINOSTaskEx.
|
overridevirtual |
add inco command
Reimplemented from CINOSTaskEx.
|
overridevirtual |
add internal command
Reimplemented from CINOSTaskEx.
tMsgId CINOSMcModule::AddDacResource | ( | const char * | apResName, |
const char * | apImageName, | ||
CINOSSync * | apSync = DF_INOS_SYNCHRONOUS |
||
) |
Add a 'analog output' resource. This function offers an alternative to adding resources at module creation time.
apResName | The name of the resource. The name should NOT include any "Dac.". This function takes care to put the resource into "Dac." object if the "UnR" option is active for this module. |
apImageName | The name of the resource in the Image. |
tMsgId CINOSMcModule::AddInpResource | ( | const char * | apResName, |
const char * | apImageName, | ||
CINOSSync * | apSync = DF_INOS_SYNCHRONOUS |
||
) |
Add a 'digital input' resource. This function offers an alternative to adding resources at module creation time.
apResName | The name of the resource. The name should NOT include any "Inp.". This function takes care to put the resource into "Inp." object if the "UnR" option is active for this module. |
apImageName | The name of the resource in the Image. |
tMsgId CINOSMcModule::AddOutResource | ( | const char * | apResName, |
const char * | apImageName, | ||
CINOSSync * | apSync = DF_INOS_SYNCHRONOUS |
||
) |
Add a 'digital output' resource. This function offers an alternative to adding resources at module creation time.
apResName | The name of the resource. The name should NOT include any "Out.". This function takes care to put the resource into "Out." object if the "UnR" option is active for this module. |
apImageName | The name of the resource in the Image. |
|
virtual |
Backup current state and call backup of all my chidren.
|
virtual |
Cancel everything.
Cancel everything.
Cancel everything.
apParam | Deprecated |
|
inlineoverrideprotectedvirtual |
clr flag
Reimplemented from CINOSTaskEx.
|
virtual |
Acknowledge the first pending message with the flag INOS_MCMSG_FLAG_CONFIRM.
|
static |
Create root module (also known as machine)
apNewModule | Will be set to the created module |
apName | The name of the created module |
apType | The type of the created module |
apParam | The parmeters provided to the created module |
|
virtual |
Create a sub module, see also Creation.
apName | Requested module name |
apType | Requested module type |
apName | Requested creation parameters, see also Parameters of class CINOSMcModule |
destroy root module (also known as machine)
apName | The name of the module to be destroyed. |
|
virtual |
Destroy requested sub module.
apName | Requested module name |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
dispatch event message
Reimplemented from CINOSTaskEx.
|
overrideprotectedvirtual |
dispatch internal message
Reimplemented from CINOSTaskEx.
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
virtual |
Get actual state of an IO. The following IO types are supported: digital input and output, analog input and output and flags.
apName | Either "*", which returns all available resources by named results, where the name is the fully qualified name of the resource, e.g. "Inp.Adc1". Otherwise, apName should be the fully qualified name of an available resource, such as "Out.DigOut1". If the resource doesn't exist or if the resource has not been assigned an existing image channel, the function will set an according error. |
|
virtual |
get pointer to coordinator
get pointer to McLua get pointer to job apName
|
static |
Get pointer to root module (also known as machine) of name 'apName'
apName | Name of the requested module |
|
static |
Get pointer to root module (also known as machine) with index 'auIndex'
auIndex | Index of the requested module |
|
virtual |
Bring module into home position.
apSync | A pointer to a sync object if used asynchronous |
|
protectedvirtual |
internal cancel
Reimplemented in CINOSMcRobot.
internal check setup mode
Reimplemented in CINOSMcRobot.
|
protectedvirtual |
internal clr setup mode
Reimplemented in CINOSMcRobot.
|
protectedvirtual |
internal switch core
emergency set
|
protectedvirtual |
internal init
Reimplemented in CINOSMcRobot.
|
protectedvirtual |
link down
Reimplemented in CINOSMcRobot.
|
inlineprotectedvirtual |
message rejected
Reimplemented in CINOSMcRobot.
|
virtual |
Init module. After a successful init the module is in state ready.
apSync | A pointer to a sync object if used asynchronous |
|
protectedvirtual |
internal off
Reimplemented in CINOSMcRobot.
|
protectedvirtual |
internal on
Reimplemented in CINOSMcRobot.
|
protectedvirtual |
event handler 'iOnSimLevelChanged'
Reimplemented in CINOSMcRobot.
|
protectedvirtual |
event handler 'iOnSlowMotionChanged'
Reimplemented in CINOSMcRobot.
internal post startup
Reimplemented from CINOSTaskEx.
|
protectedvirtual |
internal recover
Reimplemented in CINOSMcRobot.
|
protectedvirtual |
internal run script for coordinator
internal run job for Lua internal run script reply
|
protectedvirtual |
internal run registered lua function
internal set mode
|
protectedvirtual |
internal set setup mode
Reimplemented in CINOSMcRobot.
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
internal startup done (called after all module init stuff, e.g. creation of submodules is done)
|
inlineprotectedvirtual |
step command canceled
Reimplemented in CINOSMcRobot.
|
inlineprotectedvirtual |
step command skipped
Reimplemented in CINOSMcRobot.
|
inlineprotectedvirtual |
step command stopped
Reimplemented in CINOSMcRobot.
|
protectedvirtual |
internal stop
Reimplemented in CINOSMcRobot.
|
virtual |
Acknowledge the first pending message with the flag INOS_MCMSG_FLAG_MANUAL (obsolete)
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
virtual |
Switch module off.
apSync | A pointer to a sync object if used asynchronous |
|
virtual |
Switch module on.
apSync | A pointer to a sync object if used asynchronous |
|
virtual |
Pause a running production job.
apSync | A pointer to a sync object if used asynchronous |
called after creation
Reimplemented from CINOSTaskEx.
called before destruction (return false if destruction not allowed)
Reimplemented from CINOSTaskEx.
|
overrideprotectedvirtual |
Pre dispatcher.
Reimplemented from CINOSTaskEx.
|
virtual |
Prepare module for given stage. This method only makes sense if its internal implementation is overwritten by the user module.
|
overridevirtual |
put message to queue and return command id
Reimplemented from CINOSTaskEx.
|
virtual |
Recover module from a pending error.
apSync | A pointer to a sync object if used asynchronous |
uint32 CINOSMcModule::RegisterHook | ( | uintid & | aoHookId, |
const char * | apResName, | ||
void * | apHandler, | ||
void * | apObject, | ||
int32 | aiOrder | ||
) |
Register a hook with the given parameters running in the context of the given resource handler.
[out] | aoHookId | Id of registered hook |
[in] | apResName | Resource name |
[in] | apHandler | Pointer to function to be called |
[in] | apObject | Pointer to object instance if apHandler is a class method |
[in] | aiOrder | Requested order, see DF_INOS_BUS_HOOK_ORDER_DEFAULT |
|
overridevirtual |
remove child command
Reimplemented from CINOSTaskEx.
remove child module
Reimplemented from CINOSTaskEx.
remove internal command
Reimplemented from CINOSTaskEx.
|
virtual |
Restore backuped state call restore of all my chidren.
|
virtual |
Acknowledge the first pending message with the flag INOS_MCMSG_FLAG_RESUME This method is used to go further in single step mode.
|
virtual |
Acknowledge the first pending message with the flag INOS_MCMSG_FLAG_RETRY.
|
virtual |
Put module into a safe state.
apSync | A pointer to a sync object if used asynchronous |
|
inlineoverrideprotectedvirtual |
set flag
Reimplemented from CINOSTaskEx.
Set classes allowed as submodules, by base identifier (see INOS_CONTAINER_CLASS). Default: "McBase".
apAllowedBases | comma-separated list of element class bases |
|
virtual |
Set output. The following IO types are supported: digital output, analog output and flags. if apName is not '*', then digital inputs are supported as well (which may make sense if they're in overwrite mode)
apName | Either "*", which sets all available output resources to the desired value. Otherwise, apName should be the fully qualified resource name, e.g. "Out.DigOut1". If the resource doesn't exist the function sets an error. If the resource exists, but no image channel has been assigned, the function does nothing and completes with success. |
|
static |
Send a shutdown request to all root modules (also known as machine)
|
virtual |
Depending on the current module state this method has different meanings. If the module is in state off -> On is called, if it is in state on -> Init is called, if it is in state ready->a production job is started.
apSync | A pointer to a sync object if used asynchronous |
|
virtual |
Stop a running production job.
Stop a running production job.
apSync | A pointer to a sync object if used asynchronous |
Stop a running production job.
apParam | Deprecated |
Unregister a hook.
[in] | aoHookId | Id of registered hook |
[in] | apResName | Resource name |
|
protected |
Wait on arbitrary condition or timeout.
This function provides a general wait mechanism and can be used where WaitInp, WaitAxis etc. are not sufficient, e.g. for waiting on multiple inputs.
The wait condition can be specified using a lambda function. Additionally, a success and timeout handler can be specified, in order to run further commands after a successful wait, or provide a meaningful error code in case of timeout.
aFunc | Lambda function returning true if wait is completed. IMPORTANT: Will be called from a hook, so don't do anything time consuming! |
aSuccessFunc | Lambda function called after successful wait |
aTimeoutFunc | Lambda function called on timeout to return application error |
arTimeout | timeout for wait condition |
arSimTimeout | time after which wait condition is considered fulfilled for SimLevel > 0 if zero, arTimeout will be used if arTimeout is also zero, wait condition will be fulfilled immediately in sim mode |
Example:
WaitCond([this](){ // wait on two inputs return m_pDiSensor1->Test() && m_pDiSensor2->Test(); }, []() { // success EXP_MESSAGE("both sensors triggered!"); return 0; }, []() { // timeout return EXP_MSG_CODE_WAIT_SENSOR_FAILED; }, adMyTimeout);
Synchronous wait for delay.
Block and suspend until either the specified time interval elapses (unless zero) or a Cancel, Stop, or Pause command arrives. Use in preference to ::Sleep() if this interruptibility is desired.
Resolution: +/- 1 ms
arTime | delay in milliseconds, 0.0 for infinite |
|
protected |
"Remeber" whether this module uses 'unique resource naming'. This information is cached because it is used at runtime in (partially) time critical code. By caching it, we avoid string parsing in these situations.
|
protected |
module actuals
act job name
|
protected |
module properties
job name
TINOSTaskExCmdMsg<CINOSMcModule, const char*, bool> CINOSMcModule::SetItems |
Sets items (Prop, Act, Res etc.) of a module. Setting items of a sub-module is not allowed.
Values | Structural param or JSON string that defines the items and values to be set. |
Overwrite | True to overwrite valid NVRAM values. When false NVRAM values are only set if NVRAM value was not initialized yet. |