118
K
A
DAK
AMX Message Exchange Manager
void cdecl dactask(void) /* Data acquisition task */
{union msgu msgbuf; /* Message buffer */
:
Perform data acquisition functions
:
if (no_error) {
:
Construct message in msgbuf.umsg
:/* Send message at priority 3 */
ajmxsnd(msgexch, 3, &msgbuf);
:
}
else { /* Error has occurred! */
:
Construct message in msgbuf.umsg
:/* Send error message at */
/* priority 0 */
ajmxsnd(msgexch, 0, &msgbuf);
}
ajtrig(dbtid); /* Trigger data base task */
}
void cdecl dbasetask(void) /* Data base update task */
{union msgu msgbuf; /* Completion message */
:
Perform data base update functions
:
:
Construct message in msgbuf.umsg
:/* Send completion message at */
/* priority 2 */
ajmxsnd(msgexch, 2, &msgbuf);
}