libsmoco
Low-level interface library for Segment Motion Controller system
|
Data Structures | |
struct | smoco_can_connect_t |
Structure for specifying the details for connecting to the smocand daemon's CAN communication ports. More... | |
struct | SMOCO_Command |
Detailed information about a SMOCO command. More... | |
struct | SMOCO_Response |
Structure containing the details of a message received from the SMOCO hardware. More... | |
union | SMOCO_ParameterValue |
A union for convenient access to the component bytes of a 32-bit SMOCO parameter. More... | |
union | SMOCO_Parameters |
A union type for specifying parameters to SMOCO commands. More... | |
struct | SMOCO_CmdSpec |
Fully specified command to SMOCO, comprising the command, node and actuator identifiers. More... | |
Macros | |
#define | SMOCO_ADDR_VMAX_I 0x1028 |
#define | SMOCO_ADDR_VMAX_J 0x2028 |
#define | SMOCO_ADDR_VMAX_K 0x3028 |
#define | ALL_SMOCO_NODES -2 |
SMOCO_NodeID value representing all accessible SMOCO nodes. More... | |
#define | NODE_NONE -1 |
SMOCO_NodeID value representing an initialization value or a result that does not refer to a specific node. Not for use with commands. More... | |
#define | SMOCO_NODES 256 |
#define | SMOCO_ACTUATORS_PER_NODE 3 |
Typedefs | |
typedef void * | SMOCO_CTX |
"SMOCO Context" opaque resource handle. More... | |
typedef int | SMOCO_NodeID |
Identifier of a SMOCO Node (motor controller), controlling up to three actuators (motors). More... | |
typedef struct smoco_can_connect_t | smoco_can_connect_t |
Structure for specifying the details for connecting to the smocand daemon's CAN communication ports. More... | |
typedef struct SMOCO_Response | SMOCO_Response |
Structure containing the details of a message received from the SMOCO hardware. More... | |
typedef void(* | SMOCO_HANDLER )(SMOCO_CTX ctx, const SMOCO_Response *p_resp) |
General handler for received messages from SMOCO hardware. More... | |
typedef union SMOCO_ParameterValue | SMOCO_ParameterValue |
A union for convenient access to the component bytes of a 32-bit SMOCO parameter. More... | |
typedef union SMOCO_Parameters | SMOCO_Parameters |
A union type for specifying parameters to SMOCO commands. More... | |
typedef struct SMOCO_CmdSpec | SMOCO_CmdSpec |
Fully specified command to SMOCO, comprising the command, node and actuator identifiers. More... | |
#define ALL_SMOCO_NODES -2 |
SMOCO_NodeID value representing all accessible SMOCO nodes.
#define NODE_NONE -1 |
SMOCO_NodeID value representing an initialization value or a result that does not refer to a specific node. Not for use with commands.
#define SMOCO_ACTUATORS_PER_NODE 3 |
Maximum number of actuators supported by a SMOCO node.
#define SMOCO_ADDR_VMAX_I 0x1028 |
Address of velocity setting value for actuator I in SMOCO memory. Used for sending a READDATA command to fetch this value from SMOCO controller.
#define SMOCO_ADDR_VMAX_J 0x2028 |
Address of velocity setting value for actuator J in SMOCO memory. Used for sending a READDATA command to fetch this value from SMOCO controller.
#define SMOCO_ADDR_VMAX_K 0x3028 |
Address of velocity setting value for actuator K in SMOCO memory. Used for sending a READDATA command to fetch this value from SMOCO controller.
#define SMOCO_NODES 256 |
Maximum number of SMOCO nodes supported by the hardware.
typedef struct smoco_can_connect_t smoco_can_connect_t |
Structure for specifying the details for connecting to the smocand daemon's CAN communication ports.
Use with smoco_set_conn_spec(). The smocand daemon has 3 TCP ports provided for communication and control: Transmit, Receive and Control. These are numbered sequentially starting from the base_port value in this structure. See SMOCAND_CANCOMM_PORT_DFLT_BASE in smocand_protocol.h
typedef struct SMOCO_CmdSpec SMOCO_CmdSpec |
Fully specified command to SMOCO, comprising the command, node and actuator identifiers.
typedef void* SMOCO_CTX |
"SMOCO Context" opaque resource handle.
Allocated by smoco_init(), and used for all other public interface functions.
typedef void(* SMOCO_HANDLER)(SMOCO_CTX ctx, const SMOCO_Response *p_resp) |
General handler for received messages from SMOCO hardware.
A callback of this type is supplied to smoco_register_handler_universal() or smoco_register_handler_commandresponse(). The registered handler is then called for every corresponding message received.
typedef int SMOCO_NodeID |
Identifier of a SMOCO Node (motor controller), controlling up to three actuators (motors).
ALL_SMOCO_NODES is used for commands that are to be broadcast to all accessible nodes in a SMOCO system. NODE_NONE is reserved for API communications that do not refer to a particular node, or as an initialization value.
typedef union SMOCO_Parameters SMOCO_Parameters |
A union type for specifying parameters to SMOCO commands.
SMOCO commands generally accept two 32-bit values for parameters, which can be supplies in the values[2] array.
typedef union SMOCO_ParameterValue SMOCO_ParameterValue |
A union for convenient access to the component bytes of a 32-bit SMOCO parameter.
typedef struct SMOCO_Response SMOCO_Response |
Structure containing the details of a message received from the SMOCO hardware.
Provided to handlers and transaction event callbacks.
enum Actuator_Limit_Flags |
enum SMOCO_ActuatorID |
Actuator identifiers.
enum SMOCO_CommandID |
API command identifiers.
The command identifiers in this enumeration are for libsmoco API use only. They are distinct from the numeric IDs used in the SMOCO hardware communication protocol. smoco_command_find_by_hwid() can be used to obtain a SMOCO_CommandID from a SMOCO hardware identifier.
enum SMOCO_ResponseID |
Response codes from SMOCO hardware.
enum SMOCO_STATUS |
Status return for public functions.
enum SMOCO_Status_Flags |
Flag values for decoding bit-packed status information from SMOCO.
STF_VAL_* values are to be compared with the status field ANDed with STF_MSK_MV. The other STF_MSK_* masks provide bitwise access to individual bit flags, such as the enabled status of an actuator.
enum SMOCO_TXEventID_t |
Types of asynchronous "event" notifications resulting from a command sent to SMOCO.
enum SMOCO_UIlevel |