stdlib/arincView source ↗
arinc
47 items · generated by scribe fromstdlib/arinc.fd· synced 2026-11-15
Contents
- ARINC_PARTITION_NORMAL: (const)
- arinc_partition_state_name (function)
- ARINC_PORT_SOURCE: (const)
- ARINC_PORT_FIFO: (const)
- ARINC_NO_ERROR: (const)
- arinc_error_name (function)
- QueuingPort (struct)
- arinc_queuing_port_create (function)
- arinc_queuing_port_send (function)
- arinc_queuing_port_receive (function)
- arinc_queuing_port_count (function)
- arinc_queuing_port_is_empty (function)
- arinc_queuing_port_is_full (function)
- arinc_queuing_port_name (function)
- SamplingPort (struct)
- arinc_sampling_port_create (function)
- arinc_sampling_port_write (function)
- arinc_sampling_port_read (function)
- arinc_sampling_port_is_valid (function)
- arinc_sampling_port_invalidate (function)
- arinc_sampling_port_name (function)
- PartitionInfo (struct)
- arinc_partition_create (function)
- arinc_partition_state (function)
- arinc_partition_set_state (function)
- arinc_partition_period (function)
- arinc_partition_duration (function)
- arinc_partition_time_capacity (function)
- arinc_partition_name (function)
- ARINC_HM_LEVEL_MODULE: (const)
- ARINC_HM_ERROR_MEMORY: (const)
- ARINC_HM_ACTION_IGNORE: (const)
- HealthEvent (struct)
- arinc_hm_event (function)
- arinc_hm_level_name (function)
- arinc_hm_error_name (function)
- arinc_hm_action_name (function)
- arinc_hm_event_print (function)
- ScheduleEntry (struct)
- CyclicSchedule (struct)
- arinc_schedule_entry (function)
- arinc_cyclic_schedule (function)
- arinc_schedule_add_entry (function)
- arinc_schedule_count (function)
- arinc_schedule_cycle_length (function)
- arinc_schedule_partition_at (function)
- arinc_schedule_print (function)
ARINC_PARTITION_NORMAL:
Partition states per ARINC 653 specification.
pub const ARINC_PARTITION_NORMAL: i64 = 0; pub const ARINC_PARTITION_IDLE: i64 = 1; pub const ARINC_PARTITION_COLD_START: i64 = 2; pub const ARINC_PARTITION_WARM_START: i64 = 3; pub const ARINC_PARTITION_STOP: i64 = 4;Defined at line 31
arinc_partition_state_name
Get the name of a partition state.
pub fn arinc_partition_state_name(state: i64) -> str {Parameters:
state:i64
Returns: str
Defined at line 33
ARINC_PORT_SOURCE:
Port directions
pub const ARINC_PORT_SOURCE: i64 = 0; pub const ARINC_PORT_DESTINATION: i64 = 1;Defined at line 55
ARINC_PORT_FIFO:
Port disciplines (queuing ports)
pub const ARINC_PORT_FIFO: i64 = 0; pub const ARINC_PORT_PRIORITY: i64 = 1;Defined at line 57
ARINC_NO_ERROR:
Port status codes
pub const ARINC_NO_ERROR: i64 = 0; pub const ARINC_NOT_AVAILABLE: i64 = 1; pub const ARINC_INVALID_PARAM: i64 = 2; pub const ARINC_INVALID_CONFIG: i64 = 3; pub const ARINC_INVALID_MODE: i64 = 4; pub const ARINC_INVALID_POINTER: i64 = 5; pub const ARINC_INVALID_SIZE: i64 = 6; pub const ARINC_TOO_MANY_OBJECTS: i64 = 7; pub const ARINC_NOT_AVAILABLE_PART: i64 = 8; pub const ARINC_NO_ACTION: i64 = 9; pub const ARINC_TIME_OUT: i64 = 10; pub const ARINC_QUEUE_EMPTY: i64 = 11; pub const ARINC_QUEUE_FULL: i64 = 12; pub const ARINC_PORT_FULL: i64 = 13; pub const ARINC_PORT_EMPTY: i64 = 14;Defined at line 59
arinc_error_name
Get the name of an ARINC error code.
pub fn arinc_error_name(code: i64) -> str {Parameters:
code:i64
Returns: str
Defined at line 61
QueuingPort
A queuing port for inter-partition communication. Messages are stored as flat byte arrays with length prefixes. Since Vec stores i64 values, we use a flat buffer approach: msg_lengths: Vec of message lengths (one per message) msg_data: Vec of all message bytes (concatenated) msg_offsets: Vec of byte offsets into msg_data (start of each message)
pub struct QueuingPort {Fields:
| Name | Type |
|---|---|
name | str |
direction | i64 |
discipline | i64 |
max_message_size | i64 |
max_nb_message | i64 |
msg_lengths | Vec<i64> |
msg_data | Vec<i64> |
msg_offsets | Vec<i64> |
count | i64 |
data_tail | i64 |
Defined at line 125
arinc_queuing_port_create
Create a queuing port. name: Port name (must be unique within the partition) direction: ARINC_PORT_SOURCE or ARINC_PORT_DESTINATION discipline: ARINC_PORT_FIFO or ARINC_PORT_PRIORITY max_message_size: Maximum message size in bytes max_nb_message: Maximum number of messages in the queue
pub fn arinc_queuing_port_create(name: str, max_nb_message: i64, max_message_size: i64, direction: i64, discipline: i64) -> QueuingPort {Parameters:
name:strmax_nb_message:i64max_message_size:i64direction:i64discipline:i64
Returns: QueuingPort
Defined at line 144
arinc_queuing_port_send
Send a message through a queuing port. Returns ARINC_NO_ERROR on success, ARINC_PORT_FULL if the queue is full.
pub fn arinc_queuing_port_send(port: & mut QueuingPort, message: Vec<i64>) -> i64 {Parameters:
port:& mut QueuingPortmessage:Vec<i64>
Returns: i64
Defined at line 152
arinc_queuing_port_receive
Receive a message from a queuing port. Returns the message as a Vec of bytes, or an empty Vec if empty. Reads the first (oldest) message. Does not remove from queue (Fides Vec API limitation — use count to track depth).
pub fn arinc_queuing_port_receive(port: QueuingPort) -> Vec<i64> {Parameters:
port:QueuingPort
Returns: Vec<i64>
Defined at line 171
arinc_queuing_port_count
Get the number of messages currently in the queue.
pub fn arinc_queuing_port_count(port: QueuingPort) -> i64 {Parameters:
port:QueuingPort
Returns: i64
Defined at line 185
arinc_queuing_port_is_empty
Check if the queuing port is empty.
pub fn arinc_queuing_port_is_empty(port: QueuingPort) -> bool {Parameters:
port:QueuingPort
Returns: bool
Defined at line 190
arinc_queuing_port_is_full
Check if the queuing port is full.
pub fn arinc_queuing_port_is_full(port: QueuingPort) -> bool {Parameters:
port:QueuingPort
Returns: bool
Defined at line 195
arinc_queuing_port_name
Get the port name.
pub fn arinc_queuing_port_name(port: QueuingPort) -> str {Parameters:
port:QueuingPort
Returns: str
Defined at line 200
SamplingPort
A sampling port for latest-value inter-partition communication.
pub struct SamplingPort {Fields:
| Name | Type |
|---|---|
name | str |
direction | i64 |
max_message_size | i64 |
refresh_period | i64 |
last_message | Vec<i64> |
valid | bool |
last_update_time | i64 |
Defined at line 211
arinc_sampling_port_create
Create a sampling port. refresh_period: Time in milliseconds after which data is considered stale.
pub fn arinc_sampling_port_create(name: str, max_message_size: i64, direction: i64, refresh_period: i64) -> SamplingPort {Parameters:
name:strmax_message_size:i64direction:i64refresh_period:i64
Returns: SamplingPort
Defined at line 223
arinc_sampling_port_write
Write a message to a sampling port (overwrites previous).
pub fn arinc_sampling_port_write(port: & mut SamplingPort, message: Vec<i64>, current_time: i64) -> i64 {Parameters:
port:& mut SamplingPortmessage:Vec<i64>current_time:i64
Returns: i64
Defined at line 230
arinc_sampling_port_read
Read the current message from a sampling port. Returns the message Vec (may be empty if no data written). Use arinc_sampling_port_is_valid to check freshness.
pub fn arinc_sampling_port_read(port: SamplingPort) -> Vec<i64> {Parameters:
port:SamplingPort
Returns: Vec<i64>
Defined at line 240
arinc_sampling_port_is_valid
Check if the sampling port has valid (fresh) data.
pub fn arinc_sampling_port_is_valid(port: SamplingPort, current_time: i64) -> bool {Parameters:
port:SamplingPortcurrent_time:i64
Returns: bool
Defined at line 245
arinc_sampling_port_invalidate
Invalidate the sampling port data (mark as stale).
pub fn arinc_sampling_port_invalidate(port: & mut SamplingPort) -> void {Parameters:
port:& mut SamplingPort
Returns: void
Defined at line 251
arinc_sampling_port_name
Get the port name.
pub fn arinc_sampling_port_name(port: SamplingPort) -> str {Parameters:
port:SamplingPort
Returns: str
Defined at line 256
PartitionInfo
Partition information.
pub struct PartitionInfo {Fields:
| Name | Type |
|---|---|
name | str |
state | i64 |
period | i64 |
duration | i64 |
time_capacity | i64 |
Defined at line 267
arinc_partition_create
Create partition info.
pub fn arinc_partition_create(name: str, period: i64, duration: i64, time_capacity: i64) -> PartitionInfo {Parameters:
name:strperiod:i64duration:i64time_capacity:i64
Returns: PartitionInfo
Defined at line 278
arinc_partition_state
Get the current partition state.
pub fn arinc_partition_state(part: PartitionInfo) -> i64 {Parameters:
part:PartitionInfo
Returns: i64
Defined at line 285
arinc_partition_set_state
Set the partition state (state transition). In a real system, this is an OS call. Here it’s a struct update.
pub fn arinc_partition_set_state(part: & mut PartitionInfo, state: i64) -> void {Parameters:
part:& mut PartitionInfostate:i64
Returns: void
Defined at line 291
arinc_partition_period
Get the partition period (ms).
pub fn arinc_partition_period(part: PartitionInfo) -> i64 {Parameters:
part:PartitionInfo
Returns: i64
Defined at line 296
arinc_partition_duration
Get the partition duration (ms per period).
pub fn arinc_partition_duration(part: PartitionInfo) -> i64 {Parameters:
part:PartitionInfo
Returns: i64
Defined at line 301
arinc_partition_time_capacity
Get the partition time capacity (WCET budget in ms).
pub fn arinc_partition_time_capacity(part: PartitionInfo) -> i64 {Parameters:
part:PartitionInfo
Returns: i64
Defined at line 306
arinc_partition_name
Get the partition name.
pub fn arinc_partition_name(part: PartitionInfo) -> str {Parameters:
part:PartitionInfo
Returns: str
Defined at line 311
ARINC_HM_LEVEL_MODULE:
Health monitoring error levels
pub const ARINC_HM_LEVEL_MODULE: i64 = 0; pub const ARINC_HM_LEVEL_PARTITION: i64 = 1; pub const ARINC_HM_LEVEL_PROCESS: i64 = 2;Defined at line 331
ARINC_HM_ERROR_MEMORY:
Health monitoring error types
pub const ARINC_HM_ERROR_MEMORY: i64 = 0; pub const ARINC_HM_ERROR_PROGRAM: i64 = 1; pub const ARINC_HM_ERROR_TIME: i64 = 2; pub const ARINC_HM_ERROR_IO: i64 = 3; pub const ARINC_HM_ERROR_POWER: i64 = 4; pub const ARINC_HM_ERROR_FREE_RUN: i64 = 5; pub const ARINC_HM_ERROR_APPLICATION: i64 = 6;Defined at line 333
ARINC_HM_ACTION_IGNORE:
Health monitoring recovery actions
pub const ARINC_HM_ACTION_IGNORE: i64 = 0; pub const ARINC_HM_ACTION_PROCESS_RESTART: i64 = 1; pub const ARINC_HM_ACTION_PARTITION_RESTART: i64 = 2; pub const ARINC_HM_ACTION_PARTITION_STOP: i64 = 3; pub const ARINC_HM_ACTION_MODULE_RESET: i64 = 4; pub const ARINC_HM_ACTION_MODULE_STOP: i64 = 5;Defined at line 335
HealthEvent
A health monitoring event.
pub struct HealthEvent {Fields:
| Name | Type |
|---|---|
level | i64 |
error_type | i64 |
action | i64 |
partition_name | str |
timestamp | i64 |
Defined at line 337
arinc_hm_event
Create a health monitoring event.
pub fn arinc_hm_event(level: i64, error_type: i64, action: i64, partition_name: str, timestamp: i64) -> HealthEvent {Parameters:
level:i64error_type:i64action:i64partition_name:strtimestamp:i64
Returns: HealthEvent
Defined at line 346
arinc_hm_level_name
Get the error level name.
pub fn arinc_hm_level_name(level: i64) -> str {Parameters:
level:i64
Returns: str
Defined at line 353
arinc_hm_error_name
Get the error type name.
pub fn arinc_hm_error_name(error_type: i64) -> str {Parameters:
error_type:i64
Returns: str
Defined at line 367
arinc_hm_action_name
Get the recovery action name.
pub fn arinc_hm_action_name(action: i64) -> str {Parameters:
action:i64
Returns: str
Defined at line 393
arinc_hm_event_print
Print a health monitoring event.
pub fn arinc_hm_event_print(event: HealthEvent) -> void {Parameters:
event:HealthEvent
Returns: void
Defined at line 416
ScheduleEntry
A schedule entry: one partition’s time slot in the cyclic schedule.
pub struct ScheduleEntry {Fields:
| Name | Type |
|---|---|
partition_name | str |
start_time | i64 |
duration | i64 |
Defined at line 437
CyclicSchedule
A cyclic schedule: a list of partition time slots. Uses parallel arrays since Vec stores i64 values.
pub struct CyclicSchedule {Fields:
| Name | Type |
|---|---|
partition_names | Vec<str> |
start_times | Vec<i64> |
durations | Vec<i64> |
cycle_length | i64 |
Defined at line 446
arinc_schedule_entry
Create a schedule entry (returned for inspection, not stored in Vec).
pub fn arinc_schedule_entry(partition_name: str, start_time: i64, duration: i64) -> ScheduleEntry {Parameters:
partition_name:strstart_time:i64duration:i64
Returns: ScheduleEntry
Defined at line 457
arinc_cyclic_schedule
Create a cyclic schedule.
pub fn arinc_cyclic_schedule(cycle_length: i64) -> CyclicSchedule {Parameters:
cycle_length:i64
Returns: CyclicSchedule
Defined at line 464
arinc_schedule_add_entry
Add a partition time slot to the schedule.
pub fn arinc_schedule_add_entry(schedule: & mut CyclicSchedule, entry: ScheduleEntry) -> void {Parameters:
schedule:& mut CyclicScheduleentry:ScheduleEntry
Returns: void
Defined at line 471
arinc_schedule_count
Get the number of entries in the schedule.
pub fn arinc_schedule_count(schedule: CyclicSchedule) -> i64 {Parameters:
schedule:CyclicSchedule
Returns: i64
Defined at line 478
arinc_schedule_cycle_length
Get the cycle length (ms).
pub fn arinc_schedule_cycle_length(schedule: CyclicSchedule) -> i64 {Parameters:
schedule:CyclicSchedule
Returns: i64
Defined at line 483
arinc_schedule_partition_at
Find which partition should be running at a given time offset. Returns the partition name, or "" if no partition is scheduled.
pub fn arinc_schedule_partition_at(schedule: CyclicSchedule, time_offset: i64) -> str {Parameters:
schedule:CyclicScheduletime_offset:i64
Returns: str
Defined at line 489
arinc_schedule_print
Print the cyclic schedule.
pub fn arinc_schedule_print(schedule: CyclicSchedule) -> void {Parameters:
schedule:CyclicSchedule
Returns: void
Defined at line 503
Generated by scribe, the Fides documentation generator