7 #ifndef FPRIME_SPACEWASM_GUEST_H 8 #define FPRIME_SPACEWASM_GUEST_H 17 #define WASM_IMPORT(module, name) __attribute__((__import_module__(module), __import_name__(name))) 19 #define WASM_IMPORT(module, name) 20 #endif // defined(__wasm__) 22 #define WASM_MODULE_NAME ("fprime_v1") 190 #endif // __cplusplus 192 #endif // FPRIME_SPACEWASM_GUEST_H void fprime_wasm_event(FprimeEventSeverity severity, U32 msg_ptr, U32 msg_size)
Emit an event from the current WasmSequencer component at a given severity level. ...
Command had execution error.
Block the wasm execution until a message is received (subject to timeouts)
Parameter has a valid value from the parameter database.
FprimeCmdResponse fprime_wasm_command(U32 buf_ptr, U32 buf_size)
Dispatch a command, blocking call.
void fprime_wasm_serial_out(I32 index, U32 data_ptr, U32 data_size)
Invoke a serial port If the port is not connected, the module will panic/trap.
A less serious but recoverable event.
U32 fprime_wasm_get_args(U32 destination_ptr, U32 destination_size)
Get the sequence arguments this sequence was invoked with This function will write the arguments prov...
Parameter is serving its compiled-in default value.
void fprime_wasm_exit(I32 code)
Exit the current Wasm program with a return code. This function does not return.
Invalid opcode dispatched.
Command failed validation.
void fprime_wasm_rsleep(U64 us)
Pause the runtime for a specified time.
Important informational events.
FprimeQueueStatus fprime_wasm_serial_receive(I32 index, U32 data_ptr, U32 data_size, U32 actual_size_ptr, FprimeBlockingType block_type)
Receive a message from a serial input queue.
Parameter storage has not been initialized.
Less important informational events.
FprimeParamValid fprime_wasm_read_parameter(I64 id, U32 value_ptr, U32 value_size)
Read a parameter value and write it to the specified memory addresses.
A fatal non-recoverable event.
#define WASM_IMPORT(module, name)
An activity related to commanding.
Parameter value is invalid (e.g. not found)
Message was received and copied into the destination memory.
Software diagnostic events.
A serious but recoverable event.
Command tracking was cleared before the command completed.
void fprime_wasm_get_time(U32 time_ptr, U32 time_size)
Read the current F´ system time into guest memory.
Command failed to deserialize.
If there are no messages in the queue, return immediately.
void fprime_wasm_asleep(U64 us)
Pause the runtime until a specified time.
Command successfully executed.
FprimeTlmValid fprime_wasm_read_telemetry(I64 id, U32 time_ptr, U32 time_size, U32 value_ptr, U32 value_size)
Read a telemetry channel value and write it to the specified memory addresses.
Empty queue with a NONBLOCKING request.
void fprime_wasm_panic(I32 code)
Exit the current Wasm program with a failure. This function does not return.