AMPS C# Client  5.3.5.0
AMPS C# Client for .NET
AMPS.Client.Fields.AckTypeField Class Reference

Field data for a Message consisting of the Acknowledgement Type. This is used to hold the type of Acknowledgement for the Acknowledgement Message. More...

+ Inheritance diagram for AMPS.Client.Fields.AckTypeField:

Public Member Functions

Message.AckTypes getValue ()
 This method gets the value of the field as an AckTypes. More...
 
void setValue (Message.AckTypes v)
 This method sets the value of the field based on the given enum. More...
 
- Public Member Functions inherited from AMPS.Client.Fields.Field
 Field ()
 Default construntotor. More...
 
 Field (string value)
 Constructs an instance with the bytes of the specified string value. The string is interpreted as the UTF-8 representation. More...
 
 Field (byte[] buffer, int position, int length)
 Constructs an instance with the specified region of a byte buffer. Note: the bytes are not copied from the buffer. The specified buffer region is referenced by this instance. More...
 
void set (byte[] buffer, int position, int length)
 Sets the value of this instance with the specified region of a byte buffer. Note: the bytes are not copied from the buffer. The specified buffer region is referenced by this instance. More...
 
void set (byte[] buffer)
 Sets the value of this instance with the specified buffer. Note: the bytes are not copied from the buffer. The buffer is referenced by this instance. More...
 
bool isNull ()
 Indicates whether this instance's value is null. More...
 
void reset ()
 Resets the value of this instance to null. More...
 
byte byteAt (int i)
 Returns the byte at position plus index i. More...
 
override bool Equals (Object obj)
 Default implementation for Object#equals for a Field. For two Fields to be considered equal, their values must have the same length and all bytes in the value must be equal. More...
 
override int GetHashCode ()
 Gets the hash code for the Field. More...
 
Field copy ()
 Constructs a new Field and sets its value to a deep copy of this instance. More...
 
virtual void copyFrom (Field f)
 Provides a way to make this object a duplicate of f. More...
 

Static Public Member Functions

static Message.AckTypes decodeAckType (byte[] buffer, int pos, int len)
 Decodes the string acknowledgement given by AMPS to Message.AckTypes. More...
 
static String encodeAckType (Message.AckTypes ack)
 Converts the acknowledgement from an enum to a string. More...
 

Additional Inherited Members

- Public Attributes inherited from AMPS.Client.Fields.Field
byte[] buffer = null
 
int position = 0
 
int length = 0
 

Detailed Description

Field data for a Message consisting of the Acknowledgement Type. This is used to hold the type of Acknowledgement for the Acknowledgement Message.

Member Function Documentation

◆ decodeAckType()

static Message.AckTypes AMPS.Client.Fields.AckTypeField.decodeAckType ( byte[]  buffer,
int  pos,
int  len 
)
inlinestatic

Decodes the string acknowledgement given by AMPS to Message.AckTypes.

Parameters
bufferAn array of bytes, which is the first parameter passed to decodeAckType.
posAn integer which holds the position of the offset.
lenAn integer which holds the length of the acknowledgement.
Returns
The constant from Message.AckType for the input value.

◆ encodeAckType()

static String AMPS.Client.Fields.AckTypeField.encodeAckType ( Message.AckTypes  ack)
inlinestatic

Converts the acknowledgement from an enum to a string.

Parameters
ackThe integer representing the acknowledgement produced by AMPS.
Returns
A string that represents the acknowledgement type.

◆ getValue()

Message.AckTypes AMPS.Client.Fields.AckTypeField.getValue ( )
inline

This method gets the value of the field as an AckTypes.

Returns
Message.AckTypes.None if the buffer is null. Otherwise it returns the matching Message.AckTypes enum.

◆ setValue()

void AMPS.Client.Fields.AckTypeField.setValue ( Message.AckTypes  v)
inline

This method sets the value of the field based on the given enum.

Parameters
vThe value to set.

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