K-FSW v1.2.1-59-gcaca356
KFSW: modular flight software on Zephyr, for small satellites
Loading...
Searching...
No Matches
File based operations

API Areas

 Time-tagged releases
 

Data Structures

struct  kfsw_fbo_status
 

Functions

int kfsw_fbo_init (void)
 
int kfsw_fbo_run (const char *name)
 
int kfsw_fbo_stop (void)
 
int kfsw_fbo_get_status (struct kfsw_fbo_status *status)
 

Variables

const struct kfsw_param_definition_set kfsw_fbo_param_definitions
 
const struct kfsw_command_definition_set kfsw_fbo_command_definitions
 

Description

Run a list of commands from a file.

Every line is a normal command, and there are no loops or jumps.

A procedure does not own the command path. A command arriving from the shell or from another node while a procedure runs is served: it waits at most for the one handler in flight, never for the rest of the procedure, and the step it ran underneath is counted and recorded. A procedure that cannot survive that protects itself with a concurrency exclusive line, and from there a command from anywhere else is refused, naming the running procedure, until a concurrency shared line or the end of the run.

Function Documentation

◆ kfsw_fbo_get_status()

int kfsw_fbo_get_status ( struct kfsw_fbo_status *  status)

#include <fbo.h>

Read procedure state and counters.

Parameters
[out]statusDestination.
Return values
0Written.
-EINVALstatus is NULL.

◆ kfsw_fbo_init()

int kfsw_fbo_init ( void  )

#include <fbo.h>

Initialize the service.

Return values
0Ready, or already initialized.

◆ kfsw_fbo_run()

int kfsw_fbo_run ( const char *  name)

#include <fbo.h>

Start a procedure.

Returns once the run is accepted; the procedure runs on the service thread. Follow it with kfsw_fbo_get_status() or the event record.

Parameters
nameFile under the procedure directory, without a path.
Return values
0The run was accepted.
-EINVALname is NULL, empty, too long, or contains a path.
-EACCESThe service is not initialized.
-EBUSYA procedure is already running.
-ENOENTNo such procedure.
-ENODEVThere is no storage.
-EISDIRThe name refers to a directory.
-EFBIGThe file exceeds CONFIG_KFSW_FBO_BYTES_MAX.

◆ kfsw_fbo_stop()

int kfsw_fbo_stop ( void  )

#include <fbo.h>

Ask a running procedure to stop.

Wakes a wait immediately. Other command handlers finish before the stop takes effect. Stopping while idle has no effect on the next run.

Return values
0A stop was requested, or nothing was running.

Variable Documentation

◆ kfsw_fbo_command_definitions

const struct kfsw_command_definition_set kfsw_fbo_command_definitions
extern

#include <fbo.h>

Commands of this service: run a procedure, and add, cancel or clear a time-tagged release.

Registered by the application alongside its own set.

◆ kfsw_fbo_param_definitions

const struct kfsw_param_definition_set kfsw_fbo_param_definitions
extern

#include <fbo.h>

Parameter table of file based operations.