Crate dis_rs

Source

Modules§

acknowledge
acknowledge_r
action_request
action_request_r
action_response
action_response_r
aggregate_state
attribute
collision
collision_elastic
comment
comment_r
create_entity
create_entity_r
data
data_query
data_query_r
data_r
designator
detonation
electromagnetic_emission
entity_state
entity_state_update
enumerations
errors
event_report
event_report_r
fire
iff
is_group_of
is_part_of
model
other
receiver
record_query_r
record_r
remove_entity
remove_entity_r
repair_complete
repair_response
resupply_cancel
resupply_offer
resupply_received
sees
service_request
set_data
set_data_r
set_record_r
signal
start_resume
start_resume_r
stop_freeze
stop_freeze_r
transfer_ownership
transmitter
underwater_acoustic
utils

Structs§

VariableParameters

Enums§

DisError
SupportedVersion

Constants§

ALL_AGGS
ALL_APPLIC
ALL_BEAMS
ALL_EMITTERS
ALL_ENTITIES
ALL_OBJECTS
ALL_SITES
EP_NO_SEQUENCE
IO_UNTIL_FURTHER_NOTICE
MAX_PDU_SIZE_BITS
MAX_PDU_SIZE_OCTETS
MULTIPLES_PRESENT
NO_AGG
NO_APPLIC
NO_BEAM
NO_CATEGORY
NO_EMITTER
NO_ENTITY
NO_FIRE_MISSION
NO_KIND
NO_OBJECT
NO_PATTERN
NO_REF_NUMBER
NO_SITE
NO_SPECIFIC
NO_SUBCAT
NO_VALUE
POWER_ENGINE_OFF
POWER_IDLE
POWER_MAX_AFTERBURNER
POWER_MILITARY
POWER_MIN_AFTERBURNER
RQST_ASSIGN_ID

Traits§

BodyInfo
Trait for PduBody-s to query basic information, typically used in the header
Interaction
Trait for PDUs to implement whether an interaction between one or two entities happens. Used to generically query the originating EntityId and (optional) receiving EntityId of the interaction. When a PDU has no interaction, both the originator and receiver are None.
Serialize
Trait that implements writing data structures to a buffer. This serialize must be independent of protocol version differences for the data structure. Returns the number of bytes written to the buffer.
SerializePdu
Trait that implements writing a PduBody to a buffer based on the protocol version of the PDU. Returns the number of bytes written to the buffer.

Functions§

entity_capabilities_from_bytes
Helper function to convert the V7 on-wire format bytes (as u32) to an EntityCapabilities struct based on the EntityType of the entity.
parse
Parses the contents of the input, determining the DIS version by itself. This function tries to parse as many PDUs as there are in the buffer, assuming there are only complete PDUs present in the input.
parse_dr_other_parameters
parse_pdu_status_fields
Parses the pdu status sub-fields into a PduStatus struct, depending on the PduType
parse_v6
Parses the contents of the input as DIS version 6. This function tries to parse as many PDUs as there are in the buffer, assuming there are only complete PDUs present in the input.
parse_v7
Parses the contents of the input as DIS version 7. This function tries to parse as many PDUs as there are in the buffer, assuming there are only complete PDUs present in the input.
parse_v6_pdus
Parses the contents of the input as DIS version 6. This function tries to parse as many PDUs as there are in the buffer, assuming there are only complete PDUs present in the input.
parse_v7_pdus
Parses the contents of the input as DIS version 7. This function tries to parse as many PDUs as there are in the buffer, assuming there are only complete PDUs present in the input.
serialize_pdu_status
Serialization function for PduStatus. The function formats the 8-bit field for in the PduHeader. PduStatus needs the PduType to determine which combination of indicators in the status field to write to the buffer. Therefore it uses a separate function instead of the Serialize trait.
supported_protocol_versions
Returns a Vec of all ProtocolVersions supported by the crate.