![]() |
Dynamixel
2.9.5
RoadNarrows Robotics Dynamixel Package
|
bsProxy client library Dynamixel interface. More...
#include "rnr/rnrconfig.h"
#include "botsense/BotSense.h"
#include "botsense/libBotSense.h"
#include "Dynamixel/Dynamixel.h"
#include "Dynamixel/DynaTypes.h"
Go to the source code of this file.
Macros | |
#define | BS_DYNA_SERVER_MOD "libbsserver_dyna" |
server plugin dll module | |
#define | BS_DYNA_CLIENT_LIB "libbsclient_dyna" |
client app library | |
Functions | |
const char * | bsDynaGetMsgName (BsClient_P pBsClient, BsVConnHnd_T hndVConn, uint_t uMsgId) |
Get the Dynamixel message name. More... | |
int | bsDynaOpen (BsClient_P pBsClient, const char *sDevName, int nBaudRate, bool_t bInitTrace) |
Request proxy server to establish a virtual connection to the Dynamixel servo chain using the USB2Dynamixel serial dongle. More... | |
int | bsDynaClose (BsClient_P pBsClient, BsVConnHnd_T hndBsVConn) |
Request proxy server to close client's proxied Dynamixel servo chain vitual connection. More... | |
int | bsDynaSetBaudRate (BsClient_P pBsClient, BsVConnHnd_T hndBsVConn, int nBaudRate) |
Proxied request to set the Dynamixel Bus baud rate. More... | |
int | bsDynaRead8 (BsClient_P pBsClient, BsVConnHnd_T hndBsVConn, int nServoId, uint_t uAddr, byte_t *pVal, uint_t *pAlarms) |
Proxied request to read an 8-bit value from a servo's control table. More... | |
int | bsDynaWrite8 (BsClient_P pBsClient, BsVConnHnd_T hndBsVConn, int nServoId, uint_t uAddr, byte_t byVal, uint_t *pAlarms) |
Proxied request to write an 8-bit value to a servo's control table. More... | |
int | bsDynaRead16 (BsClient_P pBsClient, BsVConnHnd_T hndBsVConn, int nServoId, uint_t uAddr, ushort_t *pVal, uint_t *pAlarms) |
Proxied request to read a 16-bit value from a servo's control table. More... | |
int | bsDynaWrite16 (BsClient_P pBsClient, BsVConnHnd_T hndBsVConn, int nServoId, uint_t uAddr, ushort_t huVal, uint_t *pAlarms) |
Proxied request to write a 16-bit value to a servo's control table. More... | |
int | bsDynaSyncWrite (BsClient_P pBsClient, BsVConnHnd_T hndBsVConn, uint_t uAddr, uint_t uDataSize, DynaSyncWriteTuple_T tuples[], uint_t uCount) |
Proxied request to synchronously write values to servos. More... | |
int | bsDynaPing (BsClient_P pBsClient, BsVConnHnd_T hndBsVConn, int nServoId, bool_t *pPong) |
Proxied request to ping a servo. More... | |
int | bsDynaReset (BsClient_P pBsClient, BsVConnHnd_T hndBsVConn, int nServoId) |
Proxied request to reset a servo to defaults. More... | |
int | bsDynaSetHalfDuplexCtl (BsClient_P pClient, BsVConnHnd_T hndVConn, int nSignal) |
Proxied request to set the half-duplex control signal. More... | |
bsProxy client library Dynamixel interface.
Definition in file bsDyna.h.
int bsDynaClose | ( | BsClient_P | pBsClient, |
BsVConnHnd_T | hndBsVConn | ||
) |
Request proxy server to close client's proxied Dynamixel servo chain vitual connection.
pClient | client. |
hndVConn | Handle to virtual connection to close. |
Definition at line 143 of file bsDynaClient.cxx.
const char* bsDynaGetMsgName | ( | BsClient_P | pBsClient, |
BsVConnHnd_T | hndVConn, | ||
uint_t | uMsgId | ||
) |
Get the Dynamixel message name.
Each (virtual connection, message id) 2-tuple provides a unique server mapping that can be used associate a name string to the message (provided the id is valid and an application provides the information).
pClient | client. |
hndVConn | Virtual connection handle. |
uMsgId | Message id. |
Definition at line 89 of file bsDynaClient.cxx.
References BsDynaLookupMsgDef().
int bsDynaOpen | ( | BsClient_P | pBsClient, |
const char * | sDevName, | ||
int | nBaudRate, | ||
bool_t | bInitTrace | ||
) |
Request proxy server to establish a virtual connection to the Dynamixel servo chain using the USB2Dynamixel serial dongle.
pClient | client. |
sDevName | Proxied USB serial device name (e.g. /dev/ttyUSB0). |
nBaudRate | Baud rate. |
bInitTrace | Initial message tracing enable(true)/disable(false) state. |
Definition at line 100 of file bsDynaClient.cxx.
References BS_DYNA_SERVER_MOD, bsDynaAppInfo, BsDynaMsgIdReqOpenArgs, BsDynaPackReqOpenArgs(), and BsDynaReqOpenArgs_T::m_baudrate.
int bsDynaPing | ( | BsClient_P | pBsClient, |
BsVConnHnd_T | hndBsVConn, | ||
int | nServoId, | ||
bool_t * | pPong | ||
) |
Proxied request to ping a servo.
pClient | client. |
hndVConn | Handle to virtual connection to close. |
nServoId | Servo id. |
Definition at line 534 of file bsDynaClient.cxx.
References BsDynaMsgIdReqPing, BsDynaMsgIdRspPing, BsDynaPackReqPing(), BsDynaUnpackRspPing(), BsDynaRspPing_T::m_pong, and BsDynaReqPing_T::m_servo_id.
int bsDynaRead16 | ( | BsClient_P | pBsClient, |
BsVConnHnd_T | hndBsVConn, | ||
int | nServoId, | ||
uint_t | uAddr, | ||
ushort_t * | pVal, | ||
uint_t * | pAlarms | ||
) |
Proxied request to read a 16-bit value from a servo's control table.
pClient | client. | |
hndVConn | Handle to virtual connection to close. | |
nServoId | Servo id. | |
uAddr | Control table address. | |
[out] | pVal | Value read. |
[out] | pAlarms | Current servo alarms, if any. |
Definition at line 266 of file bsDynaClient.cxx.
References BsDynaMsgIdReqRead16, BsDynaMsgIdRspRead16, BsDynaPackReqRead16(), BsDynaUnpackRspRead16(), BsDynaReqRead16_T::m_addr, BsDynaRspRead16_T::m_alarms, BsDynaReqRead16_T::m_servo_id, and BsDynaRspRead16_T::m_val.
int bsDynaRead8 | ( | BsClient_P | pBsClient, |
BsVConnHnd_T | hndBsVConn, | ||
int | nServoId, | ||
uint_t | uAddr, | ||
byte_t * | pVal, | ||
uint_t * | pAlarms | ||
) |
Proxied request to read an 8-bit value from a servo's control table.
pClient | client. | |
hndVConn | Handle to virtual connection to close. | |
nServoId | Servo id. | |
uAddr | Control table address. | |
[out] | pVal | Value read. |
[out] | pAlarms | Current servo alarms, if any. |
Definition at line 197 of file bsDynaClient.cxx.
References BsDynaMsgIdReqRead8, BsDynaMsgIdRspRead8, BsDynaPackReqRead8(), BsDynaUnpackRspRead8(), BsDynaReqRead8_T::m_addr, BsDynaRspRead8_T::m_alarms, BsDynaReqRead8_T::m_servo_id, and BsDynaRspRead8_T::m_val.
int bsDynaReset | ( | BsClient_P | pBsClient, |
BsVConnHnd_T | hndBsVConn, | ||
int | nServoId | ||
) |
Proxied request to reset a servo to defaults.
pClient | client. |
hndVConn | Handle to virtual connection to close. |
nServoId | Servo id. |
Definition at line 593 of file bsDynaClient.cxx.
References BsDynaMsgIdReqReset, BsDynaPackReqReset(), and BsDynaReqReset_T::m_servo_id.
int bsDynaSetBaudRate | ( | BsClient_P | pBsClient, |
BsVConnHnd_T | hndBsVConn, | ||
int | nBaudRate | ||
) |
Proxied request to set the Dynamixel Bus baud rate.
pClient | client. |
hndVConn | Handle to virtual connection to close. |
nBaudRate | New baud rate. |
Definition at line 148 of file bsDynaClient.cxx.
References BsDynaMsgIdReqSetBaudRate, BsDynaPackReqSetBaudRate(), and BsDynaReqSetBaudRate_T::m_baudrate.
int bsDynaSetHalfDuplexCtl | ( | BsClient_P | pClient, |
BsVConnHnd_T | hndVConn, | ||
int | nSignal | ||
) |
Proxied request to set the half-duplex control signal.
pClient | client. |
hndVConn | Handle to virtual connection to close. |
nSignal | Signal number. |
Definition at line 640 of file bsDynaClient.cxx.
References BsDynaMsgIdReqSetHalfDuplexCtl, BsDynaPackReqSetHalfDuplexCtl(), and BsDynaReqSetHalfDuplexCtl_T::m_signal.
int bsDynaSyncWrite | ( | BsClient_P | pBsClient, |
BsVConnHnd_T | hndBsVConn, | ||
uint_t | uAddr, | ||
uint_t | uDataSize, | ||
DynaSyncWriteTuple_T | tuples[], | ||
uint_t | uCount | ||
) |
Proxied request to synchronously write values to servos.
pClient | client. |
hndVConn | Handle to virtual connection to close. |
uAddr | Control table address. |
uDataSize | Size (bytes) of data to write. |
tuples | Servo Id, Value 2-tuples |
uCount | Number of 2-tuples |
Definition at line 473 of file bsDynaClient.cxx.
References BsDynaMsgIdReqSyncWrite, BsDynaPackReqSyncWrite(), DYNA_ID_NUMOF, BsDynaReqSyncWrite_T::m_addr, BsDynaReqSyncWrite_T::m_count, BsDynaReqSyncWrite_T::m_data_size, BsDynaReqSyncWrite_T::m_tuples, and BsDynaReqSyncWrite_T::u.
int bsDynaWrite16 | ( | BsClient_P | pBsClient, |
BsVConnHnd_T | hndBsVConn, | ||
int | nServoId, | ||
uint_t | uAddr, | ||
ushort_t | huVal, | ||
uint_t * | pAlarms | ||
) |
Proxied request to write a 16-bit value to a servo's control table.
pClient | client. | |
hndVConn | Handle to virtual connection to close. | |
nServoId | Servo id. | |
uAddr | Control table address. | |
[in] | huVal | Value to write. |
[out] | pAlarms | Current servo alarms, if any. |
Definition at line 404 of file bsDynaClient.cxx.
References BsDynaMsgIdReqWrite16, BsDynaMsgIdRspWrite16, BsDynaPackReqWrite16(), BsDynaUnpackRspWrite16(), BsDynaReqWrite16_T::m_addr, BsDynaRspWrite16_T::m_alarms, BsDynaReqWrite16_T::m_servo_id, and BsDynaReqWrite16_T::m_val.
int bsDynaWrite8 | ( | BsClient_P | pBsClient, |
BsVConnHnd_T | hndBsVConn, | ||
int | nServoId, | ||
uint_t | uAddr, | ||
byte_t | byVal, | ||
uint_t * | pAlarms | ||
) |
Proxied request to write an 8-bit value to a servo's control table.
pClient | client. | |
hndVConn | Handle to virtual connection to close. | |
nServoId | Servo id. | |
uAddr | Control table address. | |
[in] | byVal | Value to write. |
[out] | pAlarms | Current servo alarms, if any. |
Definition at line 335 of file bsDynaClient.cxx.
References BsDynaMsgIdReqWrite8, BsDynaMsgIdRspWrite8, BsDynaPackReqWrite8(), BsDynaUnpackRspWrite8(), BsDynaReqWrite8_T::m_addr, BsDynaRspWrite8_T::m_alarms, BsDynaReqWrite8_T::m_servo_id, and BsDynaReqWrite8_T::m_val.