The Robot Application Programming Interface Delegate Project
RAPID Logo

RapidJointSample Class Reference

Inheritance diagram for RapidJointSample:
Collaboration diagram for RapidJointSample:

List of all members.

Classes

class  JointSampleData

Public Member Functions

 RapidJointSample (JointSample sample, JointConfig config, Map< String, DataTypeIndex > keyIndexes)
void setJointData (int index, float anglePos, float angleVel, float angleAcc, float current, float torque, float temperature, int statusCode, NamedFloatSequence aux)
 This holds the array of values in the sequence provided.
void setJointData (String frameName, float anglePos, float angleVel, float angleAcc, float current, float torque, float temperature, int statusCode, NamedFloatSequence aux) throws InvalidFrameNameException
void setJointData (float anglePos, float angleVel, float angleAcc, float current, float torque, float temperature, int statusCode, NamedFloatSequence aux)
int getIndexForJoint (String frameName)
int getIndexForJoint (JointDef jointDef)
JointDef getJointDef (int index)
void setJointData (int index, float anglePos, float angleVel, float angleAcc, float current, float torque, float temperature, int statusCode)
float[] getAuxFloatArray (int index)
float[] getJointData (int index)
List< JointSampleDatagetAllJoints ()
 Returns all joint data in an array of JointSampleDatum.
void initMaxSizeForJointDataArrays (int max)
void trimJointDataArrayToSize (int max)
NamedFloatSequence createAuxFloatDataForJoint (String name, float[] auxValues)
String toString ()
void initializeVariables ()
 ensure that there is no way to send over a null through the wire
Copyable getCopyable ()
Copyable getConfig ()
void populateTopLevelAttributes ()
 MAE-4255: create top level access variables to simplify access.

Public Attributes

JointSample jointSample
JointConfig jointConfig
Map< String, JointSamplejointDataMap = new LinkedHashMap<String, JointSample>()
Map< String, String > mappedTelemetry = new LinkedHashMap<String, String>()

Constructor & Destructor Documentation

RapidJointSample ( JointSample  sample,
JointConfig  config,
Map< String, DataTypeIndex keyIndexes 
)

Member Function Documentation

NamedFloatSequence createAuxFloatDataForJoint ( String  name,
float[]  auxValues 
)
List<JointSampleData> getAllJoints ( )

Each JointSampleDatum contains all the values associated with a single joint.

Returns:
List<JointSampleData>
float [] getAuxFloatArray ( int  index)
Copyable getConfig ( )
Copyable getCopyable ( )

Reimplemented from RapidMessageAdapter.

int getIndexForJoint ( JointDef  jointDef)

Here is the call graph for this function:

int getIndexForJoint ( String  frameName)
float [] getJointData ( int  index)
JointDef getJointDef ( int  index)
void initializeVariables ( )

Reimplemented from RapidMessageAdapter.

void initMaxSizeForJointDataArrays ( int  max)
void populateTopLevelAttributes ( )

Reimplemented from RapidMessageAdapter.

void setJointData ( int  index,
float  anglePos,
float  angleVel,
float  angleAcc,
float  current,
float  torque,
float  temperature,
int  statusCode 
)

Here is the call graph for this function:

void setJointData ( float  anglePos,
float  angleVel,
float  angleAcc,
float  current,
float  torque,
float  temperature,
int  statusCode,
NamedFloatSequence  aux 
)
void setJointData ( int  index,
float  anglePos,
float  angleVel,
float  angleAcc,
float  current,
float  torque,
float  temperature,
int  statusCode,
NamedFloatSequence  aux 
)

The values must be added a the same time in order to ensure the order of the data structure arrays.

The status code is found in the actual classes:

J_ENABLED J_DISABLED J_FROZEN J_ESTOP J_FAILURE J_OVER_CURRENT

To send a status:

public void setJointData(float anglePos, float angleVel, float angleAcc, float current, float torque, float temp, int code) { int code = getJointStatusCode(); jointData.addJointData( anglePos, angleVel, angleAcc, current, torque, temp, code); }

public int getJointStatusCode() { switch (currentJointStatus) { case (J_ENABLED.VALUE): return J_ENABLED.VALUE; break; case (J_DISABLED.VALUE): return J_DISABLED.VALUE; break; case (J_FROZEN.VALUE) return J_FROZEN.VALUE; break; case (J_ESTOP.VALUE): return J_ESTOP.VALUE; break; case (J_FAILURE.VALUE): return J_FAILURE.VALUE; break; case (J_OVER_CURRENT.VALUE): return J_OVER_CURRENT.VALUE; break; } }

Parameters:
index
anglePos
angleVel
angleAcc
current
torque
temperature
statusCode
aux
void setJointData ( String  frameName,
float  anglePos,
float  angleVel,
float  angleAcc,
float  current,
float  torque,
float  temperature,
int  statusCode,
NamedFloatSequence  aux 
) throws InvalidFrameNameException

Here is the call graph for this function:

String toString ( )

Implements IRapidMessage.

Here is the call graph for this function:

void trimJointDataArrayToSize ( int  max)

Member Data Documentation

Map<String, JointSample> jointDataMap = new LinkedHashMap<String, JointSample>()
Map<String, String> mappedTelemetry = new LinkedHashMap<String, String>()

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines