OpenSplice Java FACE API  v6.x
OpenSplice Future Airborne Capability Environment (FACE) Java API
FACE.TS Class Reference
Collaboration diagram for FACE.TS:
Collaboration graph

Public Member Functions

TransportServices getImpl ()
 

Static Public Member Functions

static void Create_Connection (String connection_name, FACE.MESSAGING_PATTERN_TYPE pattern, us.opengroup.FACE.LongHolder connection_id, FACE.CONNECTION_DIRECTION_TYPEHolder connection_direction, us.opengroup.FACE.IntHolder max_message_size, long timeout, FACE.RETURN_CODE_TYPEHolder return_code)
 The Transport Services Segment (TSS) provides an interface to create a connection. More...
 
static void Destroy_Connection (long connection_id, FACE.RETURN_CODE_TYPEHolder return_code)
 The Destroy_Connection function frees up any resources allocated to the connection. More...
 
static void Get_Connection_Parameters (us.opengroup.FACE.StringHolder connection_name, us.opengroup.FACE.LongHolder connection_id, FACE.TRANSPORT_CONNECTION_STATUS_TYPEHolder connection_status, FACE.RETURN_CODE_TYPEHolder return_code)
 The purpose of Get_Connection_Parameters is to get the information regarding the requested connection. More...
 
static void Initialize (String configuration, FACE.RETURN_CODE_TYPEHolder return_code)
 The Initialize function call allows for the Portable Components Segment (PCS) and Platform-Specific Services Segment (PSSS) component to trigger the initialization of the Transport Services Segment (TSS) component. More...
 
static void Receive_Message (long connection_id, long timeout, us.opengroup.FACE.LongHolder transaction_id, DataTypeHolder message, int message_size, FACE.RETURN_CODE_TYPEHolder return_code)
 The Receive_Message Function is used to receive data from another source. More...
 
static void Register_Callback (long connection_id, boolean[] waitset, DataTypeRead_CallbackHolder data_callback, int max_message_size, FACE.RETURN_CODE_TYPEHolder return_code)
 The purpose of Register_Callback is to provide a mechanism to read data without polling. More...
 
static void Send_Message (long connection_id, long timeout, us.opengroup.FACE.LongHolder transaction_id, DataTypeHolder message, us.opengroup.FACE.IntHolder message_size, FACE.RETURN_CODE_TYPEHolder return_code)
 The Send_Message Function is used to send data to another source. More...
 
static void Unregister_Callback (long connection_id, FACE.RETURN_CODE_TYPEHolder return_code)
 The purpose of Unregister_Callback is to provide a mechanism to unregister the callback associated with a connection_id. More...
 

Protected Member Functions

 TS ()
 

Static Protected Member Functions

static TS getInstance ()
 

Detailed Description

Definition at line 31 of file TS.java.

Constructor & Destructor Documentation

◆ TS()

FACE.TS.TS ( )
protected

Definition at line 34 of file TS.java.

Member Function Documentation

◆ Create_Connection()

static void FACE.TS.Create_Connection ( String  connection_name,
FACE.MESSAGING_PATTERN_TYPE  pattern,
us.opengroup.FACE.LongHolder  connection_id,
FACE.CONNECTION_DIRECTION_TYPEHolder  connection_direction,
us.opengroup.FACE.IntHolder  max_message_size,
long  timeout,
FACE.RETURN_CODE_TYPEHolder  return_code 
)
static

The Transport Services Segment (TSS) provides an interface to create a connection.

The parameters for the individual connections are determined through the TSS configuration capability which is set by the Initialize function call.

Possible return codes:

  • NO_ERROR - Successful completion.
  • NO_ACTION - Returned if the participant has already been created and registered. - Type has already been registered.
  • INVALID_CONFIG - Could not allocate enough memory. - Policies are not consistent with each other (e.g., configuration data is invalid, QoS attributes not supported).
    • Generic, unspecified error.
    • Attempted to modify an immutable QoSPolicy.
  • INVALID_PARAM - Returned under the following conditions: - Could not find topic name associated with the connection.
  • NOT_AVAILABLE - Unsupported operation.
  • INVALID_MODE - Connection could not be created in the current mode or operation performed at an inappropriate type.
Parameters
connection_nameThe connection_name which needs to match one of the configured connection names in the configuration. This is an input parameter.
patternThe pattern set in the connection configuration which for DDS only can be PUB_SUB. This is an input parameter.
connection_idThe connection_id which is generated by DDS and set on successful creation. This is an output parameter.
connection_directionThe connection_direction of the connection that is created. This can be SOURCE or DESTINATION. This is an output parameter.
max_message_sizeThe max_message_size for DDS this parameter is not relevant. This is an output parameter.
timeoutThe timeout for DDS this parameter is not relevant. This is an input parameter.
return_codeThe return_code This is an output parameter.

Definition at line 135 of file TS.java.

◆ Destroy_Connection()

static void FACE.TS.Destroy_Connection ( long  connection_id,
FACE.RETURN_CODE_TYPEHolder  return_code 
)
static

The Destroy_Connection function frees up any resources allocated to the connection.

Possible return codes:

  • NO_ERROR - Successful completion.
  • NO_ACTION - Object target of this operation has already been deleted.
  • INVALID_MODE - An operation was invoked on an inappropriate object or at an inappropriate time.
  • INVALID_PARAM - Connection identification (ID) invalid.
  • NOT_AVAILABLE - Unsupported operation.
  • INVALID_CONFIG - Generic, unspecified error.
  • INVALID_MODE - A pre-condition for the operation was not met. Note: In a FACE implementation, this error may imply an implementation problem since the connection is deleted and should clean up all entities/children associated with the connection.
Parameters
connection_idThe connection_id of the connection that needs to be destroyed. This is an input parameter.
return_codeThe return_code. This is an output parameter.

Definition at line 177 of file TS.java.

◆ Get_Connection_Parameters()

static void FACE.TS.Get_Connection_Parameters ( us.opengroup.FACE.StringHolder  connection_name,
us.opengroup.FACE.LongHolder  connection_id,
FACE.TRANSPORT_CONNECTION_STATUS_TYPEHolder  connection_status,
FACE.RETURN_CODE_TYPEHolder  return_code 
)
static

The purpose of Get_Connection_Parameters is to get the information regarding the requested connection.

Parameters
connection_nameThe connection_name which belongs to the given connection_id. This is an output parameter.
connection_idThe connection_id for which this status needs to return information. This is an input parameter.
connection_statusThe connection_status which consists of the following settings:
  • MESSAGE - Always 0
  • MAX_MESSAGE - Always 0.
  • MAX_MESSAGE_SIZE - Always 0.
  • CONNECTION_DIRECTION - SOURCE or DESTINATION
  • WAITING_PROCESSES_OR_MESSAGES - Not implemented
  • REFRESH_PERIOD - The configured refresh period.
  • LAST_MSG_VALIDITY - Whether or not the refresh period of last taken message has expired or not (DESTINATION)
This is an output parameter.
return_codeThe return_code This is an output parameter.

Definition at line 236 of file TS.java.

◆ getImpl()

TransportServices FACE.TS.getImpl ( )

Definition at line 45 of file TS.java.

◆ getInstance()

static TS FACE.TS.getInstance ( )
staticprotected

Definition at line 41 of file TS.java.

◆ Initialize()

static void FACE.TS.Initialize ( String  configuration,
FACE.RETURN_CODE_TYPEHolder  return_code 
)
static

The Initialize function call allows for the Portable Components Segment (PCS) and Platform-Specific Services Segment (PSSS) component to trigger the initialization of the Transport Services Segment (TSS) component.

Possible return codes:

  • INVALID_PARAM - The provided configuration is not valid
  • INVALID_CONFIG - The provided configuration contains invalid settings
  • NO_ACTION - There is already an initialized configuration.
Parameters
configurationThe configuration defined as an xml file which hold the connection configuration. This is an input parameter
return_codeThe return_code

Definition at line 67 of file TS.java.

◆ Receive_Message()

static void FACE.TS.Receive_Message ( long  connection_id,
long  timeout,
us.opengroup.FACE.LongHolder  transaction_id,
DataTypeHolder  message,
int  message_size,
FACE.RETURN_CODE_TYPEHolder  return_code 
)
static

The Receive_Message Function is used to receive data from another source.

This needs to be called on the generated type interface without using the TS Interface.

Possible return codes:

  • NO_ERROR - Successful completion.
  • NO_ACTION - Object target of this operation has already been deleted.
  • INVALID_MODE - An operation was invoked on an inappropriate object or
  • INVALID_PARAM - Illegal parameter value (e.g., connection ID).
  • INVALID_CONFIG - Generic, unspecified error.
  • NOT_AVAILABLE - Unsupported operation.
  • INVALID_MODE
    • A pre-condition for the operation was not met.
    • Operation invoked on an entity that is not yet enabled.
  • NO_ACTION - Indicates a transient situation where the operation did
Parameters
connection_idThe connection_id which is used to get the connection where to receive messages on. This is an input parameter.
timeoutThe timeout in nanoseconds, this is used to determine how long DDS should wait for new messages to arrive before returning the result. This is an input parameter.
transaction_idThe transaction_id, each time a message is read an unique transaction_id is generated for it. This is an output parameter.
messageThe message that is read by DDS This is an output parameter.
message_sizeThe message_type_id for DDS this parameter is not relevant. This is an output parameter.
return_codeThe return_code This is an output parameter.

Definition at line 289 of file TS.java.

◆ Register_Callback()

static void FACE.TS.Register_Callback ( long  connection_id,
boolean []  waitset,
DataTypeRead_CallbackHolder  data_callback,
int  max_message_size,
FACE.RETURN_CODE_TYPEHolder  return_code 
)
static

The purpose of Register_Callback is to provide a mechanism to read data without polling.

This needs to be called on the generated type interface without using the TS Interface. There can only be one callback registration per connection_id.

Possible return codes:

  • NO_ERROR - Successful completion.
  • NO_ACTION - Callback already registered for specified type.
  • INVALID_PARAM - One or more of the parameters are incorrect (e.g., invalid connection identification (ID), invalid callback, invalid message size).
  • NOT_AVAILABLE - Callback/routing function not available (e.g., callback service is not provided in this implementation).
  • INVALID_CONFIG - One or more fields in the configuration data for the connection is invalid (e.g., invalid TSS thread parameters).

Data_callback Example

IMU_DataRead_Callback initial = new FaceReadCallback();
IMU_DataRead_CallbackHolder data_callback = new IMU_DataRead_CallbackHolder(initial);
public class FaceReadCallback implements DataTypeRead_Callback {
{
 public void send_event(long transaction_id, DataTypeHolder message, long message_type_id, int message_size,
          boolean[] waitset, RETURN_CODE_TYPEHolder return_code) {
          do your action here
 }
}

Parameters
connection_idThe connection_id of the connection that needs to be used for the callback. This is an input parameter.
waitsetThe waitset for DDS this parameter is not relevant. This is an input parameter.
data_callbackThe data_callback class in which an action can be set on how to react when receiving data. This data_callback is the external operation (interface, which must be implemented by the application see example) that is called by the FACE API when new data is available for this connection. This is an input parameter.
max_message_sizeThe max_message_size for DDS this parameter is not relevant however the max_message_size supplied needs to be less then the max_message_size of the configured connection. This is an input parameter.
return_codethe return_code This is an output parameter.

Definition at line 433 of file TS.java.

◆ Send_Message()

static void FACE.TS.Send_Message ( long  connection_id,
long  timeout,
us.opengroup.FACE.LongHolder  transaction_id,
DataTypeHolder  message,
us.opengroup.FACE.IntHolder  message_size,
FACE.RETURN_CODE_TYPEHolder  return_code 
)
static

The Send_Message Function is used to send data to another source.

This needs to be called on the generated type interface without using the TS Interface.

Possible return codes:

  • NO_ERROR - Successful completion.
  • NO_ACTION - Object target of this operation has already been deleted.
  • INVALID_MODE - An operation was invoked on an inappropriate object or at an inappropriate time.
  • INVALID_PARAM - Illegal parameter value (e.g., connection ID).
  • INVALID_CONFIG - Generic, unspecified error.
  • NOT_AVAILABLE - Unsupported operation.
  • INVALID_MODE
    • A pre-condition for the operation was not met.
    • Operation invoked on an entity that is not yet enabled.
  • INVALID_CONFIG - Service ran out of resources needed to complete the operation.
  • TIMED_OUT - DDS will not return TIMEOUT, but this could be returned by the TSS implementation.
Parameters
connection_idThe connection_id which is used to get the connection where to send messages to. This is an input parameter.
timeoutThe timeout in nanoseconds, this is used to determine how long DDS at maximum can wait to send the message. This timeout cannot be greater than max_blocking_time of the supplied DataWriter QoS. This is an input parameter.
transaction_idThe transaction_id, each time a message is send an unique transaction_id is generated for it. This is an output parameter.
messageThe message that is read by DDS This is an output parameter.
message_sizeThe message_type_id for DDS this parameter is not relevant. This is an output parameter.
return_codeThe return_code This is an output parameter.

Definition at line 355 of file TS.java.

◆ Unregister_Callback()

static void FACE.TS.Unregister_Callback ( long  connection_id,
FACE.RETURN_CODE_TYPEHolder  return_code 
)
static

The purpose of Unregister_Callback is to provide a mechanism to unregister the callback associated with a connection_id.

Parameters
connection_idThe connection_id of the connection where the callback was registered. This is an input parameter.
return_codeThe return_code This is an output parameter.

Definition at line 198 of file TS.java.


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