54 #include "rnr/rnrconfig.h" 59 #include "botsense/BotSense.h" 60 #include "botsense/libBotSense.h" 91 const char *sBsProxyHostName,
97 uri.m_sScheme = (
char *)BSPROXY_URI_SCHEME;
98 uri.m_sUserInfo = NULL;
99 uri.m_sHostName = (
char *)sBsProxyHostName;
100 uri.m_nPortNum = nBsProxyIPPort;
101 uri.m_sPath = (
char *)sSerialDevName;
136 const char *sBsProxyHostName,
189 LOGERROR(
"bsProxy server %s:%d: %s.",
202 DYNA_LOG_ERROR(rc,
"Failed to open %s@%d on bsProxy server %s:%d.",
211 LOGDIAG3(
"Dynamixel bus communication opened on %s@%d " 212 "via bsProxy server %s:%d.",
317 DYNA_LOG_ERROR(rc,
"Write8(%d, 0x%02x, 0x%02x)", nServoId, uAddr, byVal);
369 DYNA_LOG_ERROR(rc,
"Write16(%d, 0x%02x, 0x%04x)", nServoId, uAddr, huVal);
387 uAddr, uValSize, tuples, uCount);
399 uAddr, uValSize, uCount);
420 return bPong?
true:
false;
uint_t m_uAlarms
servo alarms from last I/O operation
RoadNarrows Dynamixel Bus Communications Abstract Base Class Interface.
char * newstr(const char *s)
Allocate new duplicated string.
virtual int SetMsgTracing(bool bEnabled)
char * m_sDevUri
dynamixel bus device URI
bsProxy client library Dynamixel interface.
#define DYNA_OK
not an error, success
#define DYNA_ECODE_BOTSENSE
BotSense proxy error.
char * m_sSerialDevName
proxied serial device name
virtual int Read8(int nServoId, uint_t uAddr, byte_t *pVal)
Read an 8-bit value from Dynamixel servo control table.
virtual bool Ping(int nServoId)
Ping the servo.
shm_mutex_t m_mutexComm
synchonization mutex
BsClient_P m_pBsClient
BotSense client.
bool m_bIsOpen
dynamixel bus communication is [not] open
BsVConnHnd_T m_hndBsVConn
virtual connection to proxied device
#define DYNA_LOG_ERROR(ecode, efmt,...)
Log Error.
virtual int SetBaudRate(int nNewBaudRate)
virtual ~DynaCommBotSense()
Destructor.
char * m_sBsProxyHostName
BotSense proxy server domain/IP address.
int m_nBsProxyIPPort
BotSense proxy server IP port number.
void(* HalfDuplexRxFunc_T)(void *pArg, size_t uNumTxBytes)
Half-duplex control receive function type.
virtual int Reset(int nServoId)
Reset a servo back to default values.
void(* HalfDuplexTxFunc_T)(void *pArg)
Half-duplex control transmit function type.
The libDynamixel internal declarations.
virtual int Open()
(Re)Open serial communication to dynamixel bus.
bool m_bBsTrace
do [not] trace messaging
virtual int Write8(int nServoId, uint_t uAddr, byte_t byVal)
Write an 8-bit value to Dynamixel servo control table.
DynaCommBotSense()
Default constructor.
RoadNarrows Dynamixel Top-Level Package Header File.
virtual int Close()
Close serial communication to dynamixel bus and connection to BotSense proxy server.
RoadNarrows Botsene IP Proxied Dynamixel Bus Communication Class Interface.
virtual int SyncWrite(uint_t uAddr, uint_t uValSize, DynaSyncWriteTuple_T tuples[], uint_t uCount)
Synchronous Write 8/16-bit values to a list of Dynamixel servos.
virtual int Read16(int nServoId, uint_t uAddr, ushort_t *pVal)
Read a 16-bit value from Dynamixel servo control table.
#define DYNA_ECODE_BAD_VAL
bad value
virtual int SetHalfDuplexCtl(int nSignal, HalfDuplexTxFunc_T fnEnableTx=NULL, HalfDuplexRxFunc_T fnEnableRx=NULL)
#define DYNA_TRY_RC(rc, fmt,...)
Test if Dynamixel return code is not an error.
virtual int Write16(int nServoId, uint_t uAddr, ushort_t uhVal)
Write a 16-bit value to Dynamixel servo control table.
RoadNarrows Dynamixel Library Error and Logging Routines.
Dynamixel Bus Communications Abstract Base Class.
#define DYNA_TRY_COMM(comm)
Test if bus communication is available exception macro.