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

These functions perform tasks related to communications with SMOCO hardware, via message queue sockets to a running instance of the smocand daemon. More...

Collaboration diagram for SMOCO Hardware Communications:

Functions

SMOCO_STATUS smoco_set_conn_spec (SMOCO_CTX ctx, smoco_can_connect_t *p_connspec)
 Specify customized connection details for libsmoco session. More...
 
SMOCO_STATUS smoco_connect (SMOCO_CTX ctx)
 Launch a listening thread to receive communication from SMOCO, via smocand daemon. More...
 
SMOCO_STATUS smoco_disconnect (SMOCO_CTX ctx)
 Disconnect sockets from smocand daemon. More...
 

Detailed Description

These functions perform tasks related to communications with SMOCO hardware, via message queue sockets to a running instance of the smocand daemon.

Function Documentation

SMOCO_STATUS smoco_connect ( SMOCO_CTX  ctx)

Launch a listening thread to receive communication from SMOCO, via smocand daemon.

Parameters
ctxContext handle for this session.
Returns
SMOCO_ST_SUCCESS if successful, all other values indicate an error.
SMOCO_STATUS smoco_disconnect ( SMOCO_CTX  ctx)

Disconnect sockets from smocand daemon.

Parameters
ctxContext handle for this session.
Returns
SMOCO_ST_SUCCESS if successful, all other values indicate an error.
SMOCO_STATUS smoco_set_conn_spec ( SMOCO_CTX  ctx,
smoco_can_connect_t p_connspec 
)

Specify customized connection details for libsmoco session.

Allows an application to set an alternative hostname and base port number, instead of the defaults in smocand_protocol.h.

Parameters
ctxContext handle for this session
p_connspecPointer to structure containing desired connection details. If NULL, settings are restored to defaults, localhost at base port defined in smocand_protocol.h
Returns
SMOCO_ST_SUCCESS if successful, all other values indicate an error.