Roboid Control for C#
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Passer.RoboidControl.PoseMsg Class Reference

Detailed Description

Message to communicate the pose of the thing.

The pose is in local space relative to the parent. If there is not parent (the thing is a root thing), the pose will be in world space.

Inheritance diagram for Passer.RoboidControl.PoseMsg:
Passer.RoboidControl.IMessage

Public Member Functions

 PoseMsg (byte networkId, byte thingId, Spherical position, SwingTwist orientation)
 Create a new message for sending.
 
 PoseMsg (byte[] buffer)
 Create a message for receiving.
 
override byte Serialize (ref byte[] buffer)
 Serialize the message into a byte array for sending.
 

Public Attributes

byte networkId
 The network ID of the thing.
 
byte thingId
 The ID of the thing.
 
byte poseType
 bitpattern stating which pose components are available
 
Spherical position = Spherical.zero
 The position of the thing in local space in meters.
 
SwingTwist orientation = SwingTwist.zero
 The orientation of the thing in local space.
 
Spherical linearVelocity = Spherical.zero
 The linear velocity of the thing in local space in meters per second.
 
Spherical angularVelocity = Spherical.zero
 The angular veloicty of the thing in local space.
 

Static Public Attributes

const byte Id = 0x10
 The message ID.
 
const byte length = 4 + 4 + 4
 The length of the message.
 
const byte Pose_Position = 0x01
 Bit pattern for a pose with position.
 
const byte Pose_Orientation = 0x02
 Bit pattern for a pose with orientation.
 
const byte Pose_LinearVelocity = 0x04
 Bit pattern for a pose with linear velocity.
 
const byte Pose_AngularVelocity = 0x08
 Bit pattern for a pose with angular velocity.
 

Constructor & Destructor Documentation

◆ PoseMsg() [1/2]

Passer.RoboidControl.PoseMsg.PoseMsg ( byte  networkId,
byte  thingId,
Spherical  position,
SwingTwist  orientation 
)

Create a new message for sending.

Parameters
networkIdThe network ID of the thing
thingIdThe ID of the thing
positionThe position of the thing in local space in meters
orientationThe orientation of the thing in local space

◆ PoseMsg() [2/2]

Passer.RoboidControl.PoseMsg.PoseMsg ( byte[]  buffer)

Create a message for receiving.

Parameters
bufferThe byte array to parse

Member Function Documentation

◆ Serialize()

override byte Passer.RoboidControl.PoseMsg.Serialize ( ref byte[]  buffer)
virtual

Serialize the message into a byte array for sending.

Parameters
bufferThe buffer to serilize into
Returns
The length of the message in the buffer

Reimplemented from Passer.RoboidControl.IMessage.