API C#
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Kinova.DLL.USBManager.Utils.CSerializationTools Class Reference

This class contains severals tools to make easier the serialization process. More...

Static Public Member Functions

static CJacoGripper DeserializeJacoGripper (byte[] BytesArray)
 Deserializes a CJacoGripper object. More...
 
static CSingularityVector DeserializeSingularityVector (byte[] BytesArray)
 Deserializes a CSingularityVector object. More...
 
static CSpasmFilter DeserializeSpasmFilter (byte[] BytesArray)
 
static CCartesianInfo DeserializeCartesianInfo (byte[] BytesVector)
 Deserializes a CCartesianInfo object. More...
 
static CAngularInfo DeserializeAngularInfo (byte[] BytesVector)
 Deserializes a CAngularInfo object. More...
 
static float[] DeserializePositionCurrentActuators (byte[] BytesVector)
 
static CVectorEuler DeserializeVectorEuler (byte[] bytesVector, ref int index)
 Deserializes a CVectorEuler inside a byte array. More...
 
static CVectorAngle DeserializeVectorAngle (byte[] BytesVector)
 Deserializes a CVectorAngle. More...
 
static CVectorAngle DeserializeVectorAngle (byte[] BytesVector, ref int index)
 Deserializes a CVectorAngle inside a byte array. More...
 
static CTrajectoryInfo DeserializeTrajectoryInfo (byte[] BytesVector)
 Deserializes the trajectory info. More...
 
static byte[] SerializeTrajectoryInfo (CTrajectoryInfo trajectoryInfo)
 Serializes the trajectory info. More...
 
static byte[] SerializeBasicTrajectoryInfo (CTrajectoryInfo trajectoryInfo)
 Serializes the basic trajectory info. More...
 
static byte[] SerializePIDInfo (uint actuatorAddress, float proportional, float integral, float derivative)
 Serializes the address of the actuator and the PID info. More...
 
static byte[] SerializePIDFilter (uint actuatorAddress, float command, float derivative, float error)
 
static byte[] SerializeGainTorqueSensor (uint actuatorAddress, float gain)
 
static byte[] SerializeFrameType (int type)
 
static byte[] SerializeClientConfigurations (CClientConfigurations clientConfiguration)
 Serializes the client configurations. More...
 
static byte[] SerializeSerialNumber (string serialnumber)
 
static CInfoFIFOTrajectory DeserializeInfoFIFOTrajectory (byte[] infoFIFOTrajectoryBytes)
 
static CClientConfigurations DeserializeClientConfigurations (byte[] cfgClientBytes)
 Deserializes the client configurations. More...
 
static byte[] SerializeConfigurationZones (CZoneList configurationsZones)
 Serializes the configuration zones. More...
 
static CZone DeserializeConfigurationZones (byte[] cfgZonesBytes, ref int index)
 Deserializes the configuration zones. More...
 
static CZoneList DeserializeConfigurationZonesList (byte[] cfgZonesBytes)
 Deserializes the configuration zones. More...
 
static CControlMappingCharts DeserializeControlMappingCharts (byte[] cfgMapping)
 Deserializes the control mapping charts. More...
 
static CControlMapping DeserializeControlMapping (ref int index, byte[] cfgMapping)
 Deserializes the control mapping. More...
 
static byte[] SerializeControlMappingCharts (CControlMappingCharts MappingCharts)
 Serializes the control mapping charts. More...
 
static CTestResultJaco DeserializeTestResultJaco (byte[] cfgResult)
 Deserializes the test result details. More...
 
static byte[] SerializeTestResultJaco (CTestResultJaco testResultJaco)
 Serializes the test result details. More...
 
static CError DeserializeLogErrorFromJaco (byte[] LogErrors, ref int index)
 Deserializes the log error from jaco. More...
 
static CPeripheralInformation DeserializePeriphealInformationFromJaco (byte[] PeriphealInformations, ref int index)
 Deserializes the peripheal information from jaco. More...
 
static CQuickStatus DeserializeQuickStatus (byte[] data)
 
static byte[] SerializePeriphealInformation (CPeripheralInformation Info)
 Serializes the peripheal information. More...
 
static CCaptorsInfo DeserializeCaptorsInfo (byte[] bytesArray)
 
static byte[] SerializeCaptorsInfo (CCaptorsInfo data)
 
static CPosition DeserializePosition (byte[] Positions, ref int index)
 Deserializes the position log from jaco. More...
 
static byte[] SerializeJoystickValue (CJoystickValue Functionnality)
 Serializes the joystick value. More...
 
static byte[] SerializeSpasmFilter (CSpasmFilter Functionnality)
 
static CJoystickValue DeserializeJoystickValue (byte[] tabJoystickValue, ref int index)
 Deserializes the joystick value. More...
 
static CZoneLimitation DeserializeZoneLimitation (byte[] tabZoneLimitation, ref int index)
 Deserializes the zone limitation. More...
 
static CSystemStatus DeserializeSystemStatus (byte[] tabSystemStatus, ref int index)
 Deserializes the system status. More...
 
static CUserPosition DeserializeUserPosition (byte[] tabUserPosition, ref int index)
 Deserializes the user position. More...
 
static byte[] SerializeUserPosition (CUserPosition UserPosition)
 Serializes the user position. More...
 
static byte[] RemoveHeader (byte[] PacketData, short headerSize)
 Removes the header. More...
 
static byte[][] SplitData (byte[] data, ushort cmd)
 Splits the data. More...
 
static List< CPacketListSplitDataByPage (byte[] data, ushort cmd)
 Splits the data by page. More...
 

Public Attributes

const int SENSORSINFO_SIZE = 14
 
const int SENSORSINFO_SUPPLYVOLTAGE = 0
 
const int SENSORSINFO_CURRENTCONSUMED = 1
 
const int SENSORSINFO_ACCELERATIONX = 2
 
const int SENSORSINFO_ACCELERATIONY = 3
 
const int SENSORSINFO_ACCELERATIONZ = 4
 
const int SENSORSINFO_ACTUATORTEMP1 = 5
 
const int SENSORSINFO_ACTUATORTEMP2 = 6
 
const int SENSORSINFO_ACTUATORTEMP3 = 7
 
const int SENSORSINFO_ACTUATORTEMP4 = 8
 
const int SENSORSINFO_ACTUATORTEMP5 = 9
 
const int SENSORSINFO_ACTUATORTEMP6 = 10
 
const int SENSORSINFO_FINGERTEMP1 = 11
 
const int SENSORSINFO_FINGERTEMP2 = 12
 
const int SENSORSINFO_FINGERTEMP3 = 13
 

Detailed Description

This class contains severals tools to make easier the serialization process.

Member Function Documentation

static CAngularInfo Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializeAngularInfo ( byte[]  BytesVector)
static

Deserializes a CAngularInfo object.

Parameters
BytesVectorThe bytes vector.
Returns
Exceptions
OutOfMemoryExceptionInsufficient memory to perform this action.
ArgumentNullExceptionArgument BytesVector is null or one of it member is null.
ArgumentOutOfRangeExceptionThe data structure must axactly the same as the DSP's data structure.
static CCartesianInfo Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializeCartesianInfo ( byte[]  BytesVector)
static

Deserializes a CCartesianInfo object.

Parameters
BytesVectorThe bytes vector.
Returns
Exceptions
OutOfMemoryExceptionInsufficient memory to perform this action.
ArgumentNullExceptionArgument BytesVector is null or one of it member is null.
ArgumentOutOfRangeExceptionThe data structure must axactly the same as the DSP's data structure.
static CClientConfigurations Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializeClientConfigurations ( byte[]  cfgClientBytes)
static

Deserializes the client configurations.

Parameters
cfgClientBytesThe CFG client bytes.
Returns
Exceptions
ArgumentOutOfRangeExceptionData structure of API must be exactly the same as the data structure from the JACO's DSP(Main board). Verify that your version is compatible with the Jaco's version you are using.
ArgumentNullExceptionArgument cfgClientBytes is null.
static CZone Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializeConfigurationZones ( byte[]  cfgZonesBytes,
ref int  index 
)
static

Deserializes the configuration zones.

Parameters
cfgZonesBytesThe CFG zones bytes.
indexThe index.
Returns
Exceptions
ArgumentOutOfRangeExceptionData structure of API must be exactly the same as the data structure from the JACO's DSP(Main board). Verify that your version is compatible with the Jaco's version you are using.
ArgumentNullExceptionArgument cfgZonesBytes is null.
static CZoneList Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializeConfigurationZonesList ( byte[]  cfgZonesBytes)
static

Deserializes the configuration zones.

Parameters
cfgZonesBytesThe CFG zones bytes.
Returns
Exceptions
ArgumentOutOfRangeExceptionData structure of API must be exactly the same as the data structure from the JACO's DSP(Main board). Verify that your version is compatible with the Jaco's version you are using.
ArgumentNullExceptionArgument cfgZonesBytes is null.
static CControlMapping Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializeControlMapping ( ref int  index,
byte[]  cfgMapping 
)
static

Deserializes the control mapping.

Parameters
indexThe index where the control mapping is contained.
cfgMappingA byte array containing a serialized version of the control mapping.
Returns
Exceptions
ArgumentOutOfRangeExceptionData structure of API must be exactly the same as the data structure from the JACO's DSP(Main board). Verify that your version is compatible with the Jaco's version you are using.
ArgumentNullExceptionArgument cfgMapping is null.
static CControlMappingCharts Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializeControlMappingCharts ( byte[]  cfgMapping)
static

Deserializes the control mapping charts.

Parameters
cfgMappingThe CFG mapping.
Returns
Exceptions
ArgumentOutOfRangeExceptionData structure of API must be exactly the same as the data structure from the JACO's DSP(Main board). Verify that your version is compatible with the Jaco's version you are using.
ArgumentNullExceptionArgument cfgMapping is null.
static CJacoGripper Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializeJacoGripper ( byte[]  BytesArray)
static

Deserializes a CJacoGripper object.

Parameters
BytesArrayThe bytes array.
Returns
Exceptions
OutOfMemoryExceptionInsufficient memory to perform this action.
ArgumentNullExceptionArgument BytesVector is null or one of it member is null.
ArgumentOutOfRangeExceptionThe data structure must axactly the same as the DSP's data structure.
static CJoystickValue Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializeJoystickValue ( byte[]  tabJoystickValue,
ref int  index 
)
static

Deserializes the joystick value.

Parameters
tabJoystickValueThe tab joystick value.
indexThe index in a byte[] if this method is within another deserializing method.
Returns
Exceptions
ArgumentNullExceptionOne parameter is null.
ArgumentOutOfRangeExceptionData structure of API must be exactly the same as the data structure from the JACO's DSP(Main board). Verify that your version is compatible with the Jaco's version you are using.
static CError Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializeLogErrorFromJaco ( byte[]  LogErrors,
ref int  index 
)
static

Deserializes the log error from jaco.

Parameters
LogErrorsThe log errors.
indexThe index in a byte[] if this method is within another deserializing method.
Returns
Exceptions
ArgumentNullExceptionOne parameter is null.
ArgumentOutOfRangeExceptionData structure of API must be exactly the same as the data structure from the JACO's DSP(Main board). Verify that your version is compatible with the Jaco's version you are using.
static CPeripheralInformation Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializePeriphealInformationFromJaco ( byte[]  PeriphealInformations,
ref int  index 
)
static

Deserializes the peripheal information from jaco.

Parameters
PeriphealInformationsThe peripheal informations.
indexThe index.
Returns
Exceptions
ArgumentNullExceptionOne parameter is null.
ArgumentOutOfRangeExceptionData structure of API must be exactly the same as the data structure from the JACO's DSP(Main board). Verify that your version is compatible with the Jaco's version you are using.
static CPosition Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializePosition ( byte[]  Positions,
ref int  index 
)
static

Deserializes the position log from jaco.

Parameters
PositionsThe logs positions.
indexThe index in a byte[] if this method is within another deserializing method.
Returns
Exceptions
ArgumentNullExceptionOne parameter is null.
ArgumentOutOfRangeExceptionData structure of API must be exactly the same as the data structure from the JACO's DSP(Main board). Verify that your version is compatible with the Jaco's version you are using.
static CSingularityVector Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializeSingularityVector ( byte[]  BytesArray)
static

Deserializes a CSingularityVector object.

Parameters
BytesArrayThe bytes array.
Returns
Exceptions
OutOfMemoryExceptionInsufficient memory to perform this action.
ArgumentNullExceptionArgument BytesVector is null or one of it member is null.
ArgumentOutOfRangeExceptionThe data structure must axactly the same as the DSP's data structure.
static CSystemStatus Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializeSystemStatus ( byte[]  tabSystemStatus,
ref int  index 
)
static

Deserializes the system status.

Parameters
tabSystemStatusThe tab system status.
indexThe index in a byte[] if this method is within another deserializing method.
Returns
Exceptions
ArgumentNullExceptionOne parameter is null.
ArgumentOutOfRangeExceptionData structure of API must be exactly the same as the data structure from the JACO's DSP(Main board). Verify that your version is compatible with the Jaco's version you are using.
static CTestResultJaco Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializeTestResultJaco ( byte[]  cfgResult)
static

Deserializes the test result details.

Parameters
cfgResultThe CFG result.
Returns
Exceptions
ArgumentNullExceptionThe parameter cfgResult is null.
ArgumentOutOfRangeExceptionData structure of API must be exactly the same as the data structure from the JACO's DSP(Main board). Verify that your version is compatible with the Jaco's version you are using.
static CTrajectoryInfo Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializeTrajectoryInfo ( byte[]  BytesVector)
static

Deserializes the trajectory info.

Parameters
BytesVectorThe bytes vector.
Returns

///

Exceptions
OutOfMemoryExceptionInsufficient memory to perform this action.
ArgumentNullExceptionArgument BytesVector is null or one of it member is null.
ArgumentOutOfRangeExceptionThe data structure must axactly the same as the DSP's data structure.
static CUserPosition Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializeUserPosition ( byte[]  tabUserPosition,
ref int  index 
)
static

Deserializes the user position.

Parameters
tabUserPositionThe tab user position.
indexThe index in a byte[] if this method is within another deserializing method.
Returns
Exceptions
ArgumentNullExceptionOne parameter is null.
ArgumentOutOfRangeExceptionData structure of API must be exactly the same as the data structure from the JACO's DSP(Main board). Verify that your version is compatible with the Jaco's version you are using.
static CVectorAngle Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializeVectorAngle ( byte[]  BytesVector)
static

Deserializes a CVectorAngle.

Parameters
BytesVectorThe bytes vector.
Returns
Exceptions
OutOfMemoryExceptionInsufficient memory to perform this action.
ArgumentNullExceptionArgument BytesVector is null or one of it member is null.
ArgumentOutOfRangeExceptionThe data structure must axactly the same as the DSP's data structure.
static CVectorAngle Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializeVectorAngle ( byte[]  BytesVector,
ref int  index 
)
static

Deserializes a CVectorAngle inside a byte array.

Parameters
BytesVectorThe bytes vector.
indexThe index in a byte[] if this method is within another deserializing method.
Returns
Exceptions
OutOfMemoryExceptionInsufficient memory to perform this action.
ArgumentNullExceptionArgument BytesVector is null or one of it member is null.
ArgumentOutOfRangeExceptionThe data structure must axactly the same as the DSP's data structure.
static CVectorEuler Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializeVectorEuler ( byte[]  bytesVector,
ref int  index 
)
static

Deserializes a CVectorEuler inside a byte array.

Parameters
bytesVectorThe bytes vector.
indexThe index in a byte[] if this method is within another deserializing method.
Returns
Exceptions
OutOfMemoryExceptionInsufficient memory to perform this action.
ArgumentNullExceptionArgument BytesVector is null or one of it member is null.
ArgumentOutOfRangeExceptionThe data structure must axactly the same as the DSP's data structure.
static CZoneLimitation Kinova.DLL.USBManager.Utils.CSerializationTools.DeserializeZoneLimitation ( byte[]  tabZoneLimitation,
ref int  index 
)
static

Deserializes the zone limitation.

Parameters
tabZoneLimitationThe tab zone limitation.
indexThe index in a byte[] if this method is within another deserializing method.
Returns
Exceptions
ArgumentNullExceptionOne parameter is null.
ArgumentOutOfRangeExceptionData structure of API must be exactly the same as the data structure from the JACO's DSP(Main board). Verify that your version is compatible with the Jaco's version you are using.
static byte [] Kinova.DLL.USBManager.Utils.CSerializationTools.RemoveHeader ( byte[]  PacketData,
short  headerSize 
)
static

Removes the header.

Parameters
PacketDataA data block
headerSizeSize of the header.
Returns
Exceptions
ArgumentOutOfRangeExceptionIndex in BlockCopy are not good.
ArgumentNullExceptionOne or both array in BlockCopy is/are null.
static byte [] Kinova.DLL.USBManager.Utils.CSerializationTools.SerializeBasicTrajectoryInfo ( CTrajectoryInfo  trajectoryInfo)
static

Serializes the basic trajectory info.

Parameters
trajectoryInfoThe basic trajectory info.
Returns

///

Exceptions
OutOfMemoryExceptionInsufficient memory to perform this action.
ArgumentNullExceptionArgument BytesVector is null or one of it member is null.
ArgumentOutOfRangeExceptionThe data structure must axactly the same as the DSP's data structure.
static byte [] Kinova.DLL.USBManager.Utils.CSerializationTools.SerializeClientConfigurations ( CClientConfigurations  clientConfiguration)
static

Serializes the client configurations.

Parameters
clientConfigurationThe configurations client.
Returns
Exceptions
OutOfMemoryExceptionInsufficient memory to perform this action.
ArgumentNullExceptionArgument clientConfiguration is null or one of it member is null.
static byte [] Kinova.DLL.USBManager.Utils.CSerializationTools.SerializeConfigurationZones ( CZoneList  configurationsZones)
static

Serializes the configuration zones.

Parameters
configurationsZonesThe configurations zones.
Returns
Exceptions
ArgumentOutOfRangeExceptionData structure of API must be exactly the same as the data structure from the JACO's DSP(Main board). Verify that your version is compatible with the Jaco's version you are using.
ArgumentNullExceptionArgument configurationsZones is null.
static byte [] Kinova.DLL.USBManager.Utils.CSerializationTools.SerializeControlMappingCharts ( CControlMappingCharts  MappingCharts)
static

Serializes the control mapping charts.

Parameters
MappingChartsThe mapping charts.
Returns
Exceptions
ArgumentNullExceptionThe parameter CControlMappingCharts MappingCharts is null. It is possible that a local variable from this method has been set to null by error.
OutOfMemoryExceptionInsufficient memory to perform this action.
ArgumentExceptionA member of the CControlMappingCharts is a generic type and cannot be marshalled.
static byte [] Kinova.DLL.USBManager.Utils.CSerializationTools.SerializeJoystickValue ( CJoystickValue  Functionnality)
static

Serializes the joystick value.

Parameters
FunctionnalityThe selector.
Returns
A byte array containing the serialized CJoystickValue
Exceptions
ArgumentNullExceptionOne parameter is null.
ArgumentOutOfRangeExceptionData structure of API must be exactly the same as the data structure from the JACO's DSP(Main board). Verify that your version is compatible with the Jaco's version you are using.
static byte [] Kinova.DLL.USBManager.Utils.CSerializationTools.SerializePeriphealInformation ( CPeripheralInformation  Info)
static

Serializes the peripheal information.

Parameters
InfoThe info.
Returns
Exceptions
ArgumentNullExceptionOne parameter is null.
ArgumentOutOfRangeExceptionData structure of API must be exactly the same as the data structure from the JACO's DSP(Main board). Verify that your version is compatible with the Jaco's version you are using.
static byte [] Kinova.DLL.USBManager.Utils.CSerializationTools.SerializePIDInfo ( uint  actuatorAddress,
float  proportional,
float  integral,
float  derivative 
)
static

Serializes the address of the actuator and the PID info.

Returns
static byte [] Kinova.DLL.USBManager.Utils.CSerializationTools.SerializeTestResultJaco ( CTestResultJaco  testResultJaco)
static

Serializes the test result details.

Parameters
testResultJacoThe test result
Returns
Exceptions
ArgumentNullExceptionThe parameter testResultJaco is null.
ArgumentOutOfRangeExceptionData structure of API must be exactly the same as the data structure from the JACO's DSP(Main board). Verify that your version is compatible with the Jaco's version you are using.
static byte [] Kinova.DLL.USBManager.Utils.CSerializationTools.SerializeTrajectoryInfo ( CTrajectoryInfo  trajectoryInfo)
static

Serializes the trajectory info.

Parameters
trajectoryInfoThe trajectory info.
Returns

///

Exceptions
OutOfMemoryExceptionInsufficient memory to perform this action.
ArgumentNullExceptionArgument BytesVector is null or one of it member is null.
ArgumentOutOfRangeExceptionThe data structure must axactly the same as the DSP's data structure.
static byte [] Kinova.DLL.USBManager.Utils.CSerializationTools.SerializeUserPosition ( CUserPosition  UserPosition)
static

Serializes the user position.

Parameters
UserPositionThe user position.
Returns
Exceptions
ArgumentNullExceptionOne parameter is null.
ArgumentOutOfRangeExceptionData structure of API must be exactly the same as the data structure from the JACO's DSP(Main board). Verify that your version is compatible with the Jaco's version you are using.
static byte [][] Kinova.DLL.USBManager.Utils.CSerializationTools.SplitData ( byte[]  data,
ushort  cmd 
)
static

Splits the data.

Parameters
dataThe data.
cmdThe CMD.
Returns
Exceptions
ArgumentOutOfRangeExceptionIndex in BlockCopy are not good.
ArgumentNullExceptionOne or both array in BlockCopy is/are null.
static List<CPacketList> Kinova.DLL.USBManager.Utils.CSerializationTools.SplitDataByPage ( byte[]  data,
ushort  cmd 
)
static

Splits the data by page.

Parameters
dataThe data.
cmdThe CMD.
Returns
Exceptions
ArgumentOutOfRangeExceptionIndex in BlockCopy are not good.
ArgumentNullExceptionOne or both array in BlockCopy is/are null.

The documentation for this class was generated from the following file: