libsmoco
Low-level interface library for Segment Motion Controller system
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Response Handler Functions

Functions for registering handler functions to be called when response messages are received from SMOCO controllers. More...

Collaboration diagram for Response Handler Functions:

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...
 

Detailed Description

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)

Function Documentation

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.

Parameters
ctxContext handle for this session.
commandIdentifier of intended SMOCO command
handlerFunction 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.

Parameters
ctxContext handle for this session.
handlerFunction pointer for application-supplied callback
Returns
SMOCO_ST_SUCCESS if successful, all other values indicate an error.