|
OpenASIP 2.2
|
#include <OperationTriggeredField.hh>


Public Member Functions | |
| OperationTriggeredField (const ObjectState *state, OperationTriggeredEncoding &parent) | |
| OperationTriggeredField (OperationTriggeredEncoding &parent, int piece, int start, int width) | |
| int | piece () const |
| void | setPiece (int piece) |
| int | start () const |
| void | setStart (int start) |
| virtual void | loadState (const ObjectState *state) |
| virtual ObjectState * | saveState () const |
| virtual int | childFieldCount () const |
| virtual int | width () const |
| void | setWidth (int width) |
Public Member Functions inherited from Serializable | |
| virtual | ~Serializable () |
Static Public Attributes | |
| static const std::string | OSNAME_FIELD = "ota-field" |
| static const std::string | OSKEY_PIECE_NAME = "piece" |
| static const std::string | OSKEY_START_NAME = "start" |
| static const std::string | OSKEY_WIDTH_NAME = "width" |
Private Attributes | |
| int | piece_ |
| int | start_ |
| int | width_ |
Definition at line 43 of file OperationTriggeredField.hh.
| OperationTriggeredField::OperationTriggeredField | ( | const ObjectState * | state, |
| OperationTriggeredEncoding & | parent | ||
| ) |
The constructor
Loads the state of the field encoding from the given ObjectState tree
| state | The ObjectState tree |
| parent | The parent operation triggered encoding |
| ObjectStateLoadingException | If an error occurs while loading the state. |
Definition at line 69 of file OperationTriggeredField.cc.
References OperationTriggeredEncoding::addField(), and loadState().

| OperationTriggeredField::OperationTriggeredField | ( | OperationTriggeredEncoding & | parent, |
| int | piece, | ||
| int | start, | ||
| int | width | ||
| ) |
The constructor.
Registers the field encoding to the parent binary encoding automatically.
| parent | The parent binaryEncoding. |
Definition at line 51 of file OperationTriggeredField.cc.
References OperationTriggeredEncoding::addField().

|
virtual |
Always returns 0 because field encoding does not have any child fields.
Definition at line 115 of file OperationTriggeredField.cc.
|
virtual |
Loads the state of the field encoding from the given ObjectState tree.
| state | The ObjectState tree. |
| ObjectStateLoadingException | If an error occurs while loading the state. |
Implements Serializable.
Definition at line 145 of file OperationTriggeredField.cc.
References Exception::errorMessage(), ObjectState::intAttribute(), OSKEY_PIECE_NAME, OSKEY_START_NAME, OSKEY_WIDTH_NAME, piece_, start_, and width_.
Referenced by OperationTriggeredField().

| int OperationTriggeredField::piece | ( | ) | const |
Returns the piece index that indicates the index of the encoding piece.
Definition at line 82 of file OperationTriggeredField.cc.
References piece_.
Referenced by setPiece().
|
virtual |
Saves the state of the field encoding to an ObjectState tree.
Implements Serializable.
Definition at line 170 of file OperationTriggeredField.cc.
References OSKEY_PIECE_NAME, OSKEY_START_NAME, OSKEY_WIDTH_NAME, OSNAME_FIELD, piece_, ObjectState::setAttribute(), start_, and width_.
Referenced by OperationTriggeredEncoding::saveState().

| void OperationTriggeredField::setPiece | ( | int | piece | ) |
| void OperationTriggeredField::setStart | ( | int | start | ) |
| void OperationTriggeredField::setWidth | ( | int | width | ) |
| int OperationTriggeredField::start | ( | ) | const |
Returns the piece index that indicates the index of the encoding piece.
Definition at line 98 of file OperationTriggeredField.cc.
References start_.
Referenced by setStart().
|
virtual |
Returns the bit width of the field encoding
Definition at line 126 of file OperationTriggeredField.cc.
References width_.
Referenced by setWidth(), and OperationTriggeredEncoding::width().
|
static |
Definition at line 66 of file OperationTriggeredField.hh.
Referenced by loadState(), and saveState().
|
static |
Definition at line 67 of file OperationTriggeredField.hh.
Referenced by loadState(), and saveState().
|
static |
Definition at line 68 of file OperationTriggeredField.hh.
Referenced by loadState(), and saveState().
|
static |
Definition at line 65 of file OperationTriggeredField.hh.
Referenced by OperationTriggeredEncoding::loadState(), and saveState().
|
private |
Definition at line 71 of file OperationTriggeredField.hh.
Referenced by loadState(), piece(), saveState(), and setPiece().
|
private |
Definition at line 72 of file OperationTriggeredField.hh.
Referenced by loadState(), saveState(), setStart(), and start().
|
private |
Definition at line 73 of file OperationTriggeredField.hh.
Referenced by loadState(), saveState(), setWidth(), and width().