public interface IForteSocket
JAVA object/primitive | IEC 61499 data type |
---|---|
boolean | BOOL |
int | SINT, INT, DINT, USINT, UINT, UDINT |
long | LINT, ULINT |
float | REAL |
double | LREAL |
DateAndTime*, LocalDateTime | DATE_AND_TIME |
String | STRING** |
ForteDataType
,
DateAndTime
,
IPluginController
Modifier and Type | Method and Description |
---|---|
byte[] |
array()
This method is intended to allow array-backed buffers to be passed to native code more efficiently.
|
int |
capacity()
Returns the buffer's capacity
|
void |
disconnect()
Closes the connection.
|
boolean |
getBool()
Increments the position by one.
|
boolean[] |
getBoolArray()
Increments the position by one.
|
DateAndTime |
getDateAndTime()
Increments the position by one.
|
DateAndTime[] |
getDateAndTimeArray()
Increments the position by one.
|
double |
getDouble()
Increments the position by one.
|
double[] |
getDoubleArray()
Increments the position by one.
|
float |
getFloat()
Increments the position by one.
|
float[] |
getFloatArray()
Increments the position by one.
|
int |
getInt()
Increments the position by one.
|
int[] |
getIntArray()
Increments the position by one.
|
long |
getLong()
Increments the position by one.
|
long[] |
getLongArray()
Increments the position by one.
|
int |
getNumDataValues() |
int |
getPosition()
Returns this data buffer's position.
|
java.lang.String |
getString()
Increments the position by one.
|
java.lang.String[] |
getStringArray()
Increments the position by one.
|
ForteDataType |
getTypeAtNextPosition()
Returns Intended for enabling the dynamic retrieval of data from the buffer.
|
ForteDataType |
getTypeAtPosition(int position)
Intended for enabling the dynamic retrieval of data from the buffer.
|
boolean |
incrementPosition()
Increments this buffer's position by 1.
|
boolean |
isArrayAtPosition(int position)
Intended for enabling the dynamic retrieval of data from the buffer.
|
boolean |
isBool() |
boolean |
isBoolArray() |
boolean |
isConnected() |
boolean |
isDateAndTime() |
boolean |
isDateAndTimeArray() |
boolean |
isDouble() |
boolean |
isDoubleArray() |
boolean |
isFloat() |
boolean |
isFloatArray() |
boolean |
isInt() |
boolean |
isIntArray() |
boolean |
isLong() |
boolean |
isLongArray() |
boolean |
isString() |
boolean |
isStringArray() |
java.util.Iterator<java.lang.Object> |
iterator()
Use this method with caution.
|
boolean |
put(boolean value)
Adds a boolean to be sent to FORTE as an IEC 61499 BOOLEAN to buffer
|
boolean |
put(boolean[] value)
Adds a boolean[] array to be sent to FORTE as an IEC 61499 BOOLEAN array to buffer
|
boolean |
put(DateAndTime value)
Adds a DateAndTime object to be sent to FORTE as IEC 61499 DATE_AND_TIME data to buffer
|
boolean |
put(DateAndTime[] value)
Adds a DateAndTime[] array to be sent to FORTE as an IEC 61499 DATE_AND_TIME array to buffer
|
boolean |
put(double value)
Adds a double to be sent to FORTE as IEC 61499 LREAL to buffer
|
boolean |
put(double[] value)
Adds a double[] array to be sent to FORTE as an IEC 61499 LREAL array to buffer
|
boolean |
put(float value)
Adds a float to be sent to FORTE as IEC 61499 REAL to buffer
|
boolean |
put(float[] value)
Adds a float[] array to be sent to FORTE as an IEC 61499 REAL array to buffer
|
boolean |
put(int value)
Adds a 32 bit int to be sent to FORTE as one of the IEC 61499 32 bit integer types to buffer
|
boolean |
put(int[] value)
Adds a 32 bit int[] array to be sent to FORTE as an IEC 61499 32 bit integer array to buffer
|
boolean |
put(long value)
Adds a 64 bit long integer to be sent to FORTE as an IEC 61499 integer to buffer
|
boolean |
put(long[] value)
Adds a 64 bit long[] integer array to be sent to FORTE as an IEC 61499 integer array to buffer
|
boolean |
put(java.lang.String value)
Adds a String to be sent to FORTE as an IEC 61499 STRING to buffer
|
boolean |
put(java.lang.String[] value)
Adds a String[] array to be sent to FORTE as an IEC 61499 STRING array to buffer
|
void |
recvData()
Translates byte data representing FORTE data types buffered within the internal DataInputStream to Java data types and stores the Java data types in a buffer.
|
void |
reset()
Resets the position to its initialized state and clears the internal byte buffer.
|
void |
rewind()
Resets the position to its initialized state.
|
void |
sendData()
Writes the data stored within this instance's byte buffer to a DataOutputStream.
|
void |
sendRsp()
Sends a response (e.g., a single byte with the value of 5)
|
void |
setDateAndTimeReference(DateAndTime dt)
Sets a DateAndTime object as reference for any new DateAndTime objects received.
|
void |
setPosition(int position)
Sets the position.
|
byte[] array()
int capacity()
boolean getBool()
isBool()
to determine whether the correct data type is at the next position.java.util.NoSuchElementException
boolean[] getBoolArray()
isBoolArray()
to determine whether the correct data type is at the next position.java.util.NoSuchElementException
DateAndTime getDateAndTime()
isDateAndTime()
to determine whether the correct data type is at the next position.java.util.NoSuchElementException
DateAndTime[] getDateAndTimeArray()
isDateAndTimeArray()
to determine whether the correct data type is at the next position.java.util.NoSuchElementException
double getDouble()
isDouble()
to determine whether the correct data type is at the next position.java.util.NoSuchElementException
double[] getDoubleArray()
isDoubleArray()
to determine whether the correct data type is at the next position.java.util.NoSuchElementException
float getFloat()
isFloat()
to determine whether the correct data type is at the next position.java.util.NoSuchElementException
float[] getFloatArray()
isFloatArray()
to determine whether the correct data type is at the next position.java.util.NoSuchElementException
int getInt()
isInt()
to determine whether the correct data type is at the next position.java.util.NoSuchElementException
int[] getIntArray()
isIntArray()
to determine whether the correct data type is at the next position.java.util.NoSuchElementException
long getLong()
isLong()
to determine whether the correct data type is at the next position.java.util.NoSuchElementException
long[] getLongArray()
isLongArray()
to determine whether the correct data type is at the next position.java.util.NoSuchElementException
int getNumDataValues()
int getPosition()
incrementPosition()
must be called before extracting data.java.lang.String getString()
isString()
to determine whether the correct data type is at the next position.java.util.NoSuchElementException
java.lang.String[] getStringArray()
isStringArray()
to determine whether the correct data type is at the next position.java.util.NoSuchElementException
ForteDataType getTypeAtNextPosition()
ForteDataType getTypeAtPosition(int position)
position
- boolean incrementPosition()
boolean isArrayAtPosition(int position)
position
- boolean isBool()
boolean isBoolArray()
boolean isDateAndTime()
boolean isDateAndTimeArray()
boolean isDouble()
boolean isDoubleArray()
boolean isFloat()
boolean isFloatArray()
boolean isInt()
boolean isIntArray()
boolean isLong()
boolean isLongArray()
boolean isString()
boolean isStringArray()
java.util.Iterator<java.lang.Object> iterator()
#isDouble()}, {@link #getDouble()} {@link #isDoubleArray()}, {@link #getDoubleArray()},
{@link #getBool()}, {@link #getInt()} {@link #getLong()}, {@link #getFloat()}, {@link #getString()},
{@link #getDateAndTime()}, {@link #getLocalDateTime()},
{@link #getBoolArray()}, {@link #getIntArray()} {@link #getLongArray()}, {@link #getFloatArray()}, {@link #getStringArray()},
{@link #getDateAndTimeArray()}, {@link #getLocalDateTimeArray()}, etc.
boolean put(boolean value)
value
- boolean put(boolean[] value)
value
- boolean put(DateAndTime value)
value
- boolean put(DateAndTime[] value)
value
- boolean put(double value)
value
- boolean put(double[] value)
value
- boolean put(float value)
value
- boolean put(float[] value)
value
- boolean put(int value)
value
- Value to be converted to byte databoolean put(int[] value)
value
- boolean put(long value)
value
- boolean put(long[] value)
value
- boolean put(java.lang.String value)
value
- boolean put(java.lang.String[] value)
value
- void recvData() throws java.io.IOException, UnsupportedForteDataTypeException
reset()
is called after completing the write operation.
Before calling this method, a data input layer must be set using #setInputLayer(AbstractCommunicationLayer)
.iStream
- DataInputStrem connected to a FORTE CLIENT or SERVER function blockjava.io.IOException
UnsupportedForteDataTypeException
void reset()
void rewind()
void setDateAndTimeReference(DateAndTime dt)
void setPosition(int position)
getNumDataValues()
].
-1 is the initialized state.position
- void sendData() throws java.io.IOException
reset()
is called after completing the write operation.
Before calling this method, the data output layer must be set using #setOutputLayer(AbstractCommunicationLayer)
.java.io.IOException
void sendRsp() throws java.io.IOException
java.io.IOException
void disconnect() throws java.io.IOException
java.io.IOException
boolean isConnected()