Unigine::HLA::HLAClientInterface Class
Header: | #include <HLAClientInterface.h> |
This class represents the HLA Client interface.
HLAClient plugin must be loaded.
HLAClientInterface Class
Members
static HLAClientInterfacePtr create()
int init(int version, const char * fom_path, const char * federate_name, const char * federation_execution_name)
Initializes the HLA Client using the given parameters.Arguments
- int version - Callback type. One of the following values: RTI13, RTI1516, or RTI1516E.
- const char * fom_path - path to FOM file (.fed or .xml, depends on version)
- const char * federate_name - name of the current instance
- const char * federation_execution_name - name of the group of federates with the same FOM
Return value
1 if the HLA Client was initialized successfully; otherwise, 0.unsigned long getInteractionClassHandle(const char * name)
Returns interaction class handle.Arguments
- const char * name - Interaction class name.
Return value
Interaction class handle.unsigned long getParameterHandle(const char * name, unsigned long which_class)
Returns parameter handle.Arguments
- const char * name - Parameter name.
- unsigned long which_class - Class to which the parameter belongs.
Return value
Handle of the specified parameter.unsigned long getObjectClassHandle(const char * name)
Returns object class handle.Arguments
- const char * name - Object class name
Return value
Handle of the specified object class.unsigned long getAttributeHandle(const char * name, unsigned long which_class)
Returns attribute handle.Arguments
- const char * name - Attribute name.
- unsigned long which_class - Class to which the attribute belongs.
Return value
Handle of the specified attribute.void publishAndSubscribeObject(unsigned long handle_id, const Vector<unsigned long> & attributes)
Publish and subscribe for the specified Object Class.Arguments
- unsigned long handle_id - Handle ID.
- const Vector<unsigned long> & attributes - List of attributes.
void publishObject(unsigned long handle_id, const Vector<unsigned long> & attributes)
Publish the specified Object Class.Arguments
- unsigned long handle_id - Handle ID.
- const Vector<unsigned long> & attributes - List of attributes.
void subscribeObject(unsigned long handle_id, const Vector<unsigned long> & attributes)
Subscribe for the specified Object Class.Arguments
- unsigned long handle_id - Handle ID.
- const Vector<unsigned long> & attributes - List of attributes.
void publishAndSubscribeInteraction(unsigned long handle_id)
Publish and subscribe for the specified Interaction Class.Arguments
- unsigned long handle_id - Class handle ID.
void publishInteraction(unsigned long handle_id)
Publish the specified Interaction Class.Arguments
- unsigned long handle_id - Class handle ID.
void subscribeInteraction(unsigned long handle_id)
Subscribe to the specified Interaction Class.Arguments
- unsigned long handle_id - Class handle ID.
unsigned long registerObjectInstance(unsigned long class_handle_id, const char * name)
Registers a new object instance instance with the specified name.Arguments
- unsigned long class_handle_id - Class handle ID.
- const char * name - Object name.
Return value
Object handle.int updateAttributeValues(unsigned long object_id, const Map<unsigned long, String> & attributes, const char * tag)
Updates attribute values for the specified object instance.Arguments
- unsigned long object_id - Object ID.
- const Map<unsigned long, String> & attributes - List of attributes.
- const char * tag - User supplied tag.
Return value
1 if the specified attribute values were updated successfully; otherwise, 0.int deleteObjectInstance(unsigned long object_id, const char * tag)
Deletes the specified object instance.Arguments
- unsigned long object_id - Object ID.
- const char * tag - User supplied tag.
Return value
1 if the specified object instance was deleted successfully; otherwise, 0.int sendInteraction(unsigned long handle_id, const Map<unsigned long, String> & parameters, const char * tag)
Sends an interaction with the specified parameters.Arguments
- unsigned long handle_id - Handle ID.
- const Map<unsigned long, String> & parameters - List of parameters.
- const char * tag - User supplied tag.
Return value
1 if interaction was sent successfully; otherwise, 0.CallbackBase * addCallback(int callback, CallbackBase * func)
Adds a callback function of the specified type.Arguments
- int callback - Callback type. One of the CALLBACK_* variables.
- CallbackBase * func - Callback pointer.
Return value
Pointer to the added callback.void removeCallback(int callback, CallbackBase * func)
Removes a callback function of the specified type.Arguments
- int callback - Callback type. One of the CALLBACK_* variables.
- CallbackBase * func - Callback pointer.
void clearCallbacks(int callback)
Clears all callback functions of the specified type.Arguments
- int callback - Callback type. One of the CALLBACK_* variables.
int shutdown()
Shuts down the HLA Client.Return value
1 if the HLA Client was shut down successfully; otherwise, 0.int CALLBACK_DISCOVER_OBJECT_INSTANCE
Description
Discover Object Instance event callback.int CALLBACK_REFLECT_ATTRIBUTE_VALUES
Description
Reflect Attribute Values event callback.int CALLBACK_RECEIVE_INTERACTION
Description
Receive Interaction event callback.int CALLBACK_REMOVE_OBJECT_INSTANCE
Description
Remove Object Instance event callback.int RTI13
Description
HLA version 1.3.int RTI1516
Description
HLA version IEEE 1516.int RTI1516E
Description
HLA version IEEE 1516e.Last update: 04.06.2018
Помогите сделать статью лучше
Была ли эта статья полезной?
(или выберите слово/фразу и нажмите Ctrl+Enter