GenericHostMsg Class

Windows CE 5.0 Not SupportedWindows Embedded NavReady 2009 Supported

10/16/2008

This class represents a generic message that is sent from the host device to the MSN Direct receiver.

Syntax

class GenericHostMsg : public Msg

Methods

Methods Description

GenericHostMsg Constructor

Initializes the fields that are common to all messages.

GenericHostMsg::GetApplicationType

Returns the application type of the message that was received from the MSN Direct receiver.

GenericHostMsg::GetBuffer

Returns a pointer to the first byte of the message after the beginning-of-frame.

GenericHostMsg::GetBufferWithFrames

Returns a pointer to the first byte of the current message, which includes framing.

GenericHostMsg::GetErrorCode

Returns the first byte of the payload, which is always the error code of the message.

GenericHostMsg::GetSize

Returns the size of the message, subtracting the bytes used for framing.

GenericHostMsg::GetSizeWithFrames

Returns the size of the message, including the bytes used for framing.

GenericHostMsg::GetTransactionId

Returns the transaction ID of the message.

GenericHostMsg::IsResponse

Returns true if this message is a response message.

GenericHostMsg::SetErrorCode

Sets the first byte of the payload, which is always the error code of the message, to the specified value.

GenericHostMsg::SetResponse

Sets the last bit of the transaction ID, which denotes that the current message is a response message.

GenericHostMsg::SetSizeWithFrames

Sets the size of the message, which includes framing.

GenericHostMsg::SetTransactionId

Sets the transaction ID of the message.

Remarks

This class provides the memory space to hold any message generated by the host device from the MSN Direct receiver. This class also provides methods that are generic to all messages initiated by the host device.

This class is used by the DBR701 class to send messages from the host device to the MSN Direct receiver. This class can also be used for transactions that are initiated by the host device. This class can be typecast to other messages so that the fields can be easily accessed or set, by using the Get and Set methods.This class is an example of a message that can be of variable length. For messages that can be of variable-length, to set the actual length of the message, make sure that you match the actual size of the class by writing a value to the SizeWithFrames field.

Requirements

Header DBRLib.h
Library DBRLib.lib
Windows Embedded CE Windows CE 5.0, Windows Embedded NavReady 2009

See Also

Reference

MSN Direct Services Classes