libsmoco
Low-level interface library for Segment Motion Controller system
|
Functions for registering handler functions to be called when response messages are received from SMOCO controllers. More...
Functions | |
SMOCO_STATUS | smoco_register_handler_universal (SMOCO_CTX ctx, SMOCO_HANDLER handler) |
Register a handler (callback function) to be called for every received message. More... | |
SMOCO_STATUS | smoco_register_handler_commandresponse (SMOCO_CTX ctx, SMOCO_CommandID command, SMOCO_HANDLER handler) |
Register a handler to be called for messages received in response to a given command. More... | |
Functions for registering handler functions to be called when response messages are received from SMOCO controllers.
libsmoco provides a simple mechanism for customizing how responses from SMOCO are dealt with by a client application. These execute outside and in addition to callbacks for other contexts (eg. transaction handling for long running move operations)
SMOCO_STATUS smoco_register_handler_commandresponse | ( | SMOCO_CTX | ctx, |
SMOCO_CommandID | command, | ||
SMOCO_HANDLER | handler | ||
) |
Register a handler to be called for messages received in response to a given command.
ctx | Context handle for this session. |
command | Identifier of intended SMOCO command |
handler | Function pointer for application-supplied callback |
SMOCO_STATUS smoco_register_handler_universal | ( | SMOCO_CTX | ctx, |
SMOCO_HANDLER | handler | ||
) |
Register a handler (callback function) to be called for every received message.
ctx | Context handle for this session. |
handler | Function pointer for application-supplied callback |