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

Field data for a Message consisting of a reason. This reason helps to provide more information about acknowledgements. More...

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

Public Member Functions

Message.Reasons getValue ()
 Retrieves the reason value from this field. More...
 
String getText ()
 Returns the value of this reason field as a descriptive text string. More...
 
void setValue (Message.Reasons v)
 Sets the value of this reason field using the specified reason code integer. 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 String encodeReason (Message.Reasons r)
 Utility method that takes a reason code integer and returns the associated descriptive text. Returns "unknown" if the integer code is not known. More...
 

Static Protected Attributes

const String LATIN1 = "ISO-8859-1"
 

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 a reason. This reason helps to provide more information about acknowledgements.

Member Function Documentation

◆ encodeReason()

static String AMPS.Client.Fields.ReasonField.encodeReason ( Message.Reasons  r)
inlinestatic

Utility method that takes a reason code integer and returns the associated descriptive text. Returns "unknown" if the integer code is not known.

Parameters
rThe reason code integer to be encoded.
Returns
The descriptive text reason.

◆ getText()

String AMPS.Client.Fields.ReasonField.getText ( )
inline

Returns the value of this reason field as a descriptive text string.

Returns
The reason string.

◆ getValue()

Message.Reasons AMPS.Client.Fields.ReasonField.getValue ( )
inline

Retrieves the reason value from this field.

Returns
The reason value.

◆ setValue()

void AMPS.Client.Fields.ReasonField.setValue ( Message.Reasons  v)
inline

Sets the value of this reason field using the specified reason code integer.

Parameters
vThe reason code integer.

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