View Source grisp_info (grisp v2.8.0)

GRiSP general information.

When running grisp on a host machine during development, the functions return:

1> grisp_info:hardware().
#{
    platform => host,
    version => <<"1">>,
    serial => <<"0000">>
    batch => 1,
    pcb_variant => 1
    pcb_version => <<"1">>,
    prod_date => {{2022, 1, 28},{0,0,0}}
}
2> grisp_info:boot().
#{
    boot => host,
    valid => host,
    next => host
}

For grisp_info:software() to be defined during local development, a term file named MANIFEST must exists in the current directory and looks like:

%% coding: utf-8
{platform, <<"grisp2">>}.
{id, <<"83613140847d62b47c3f220b6f43e2de561be441">>}.
{relname, <<"my_app">>}.
{relvsn, <<"0.1.0">>}.
{profiles, [dev]}.
{package, [
    {toolchain, [{revision, <<"516707805fd33285679e9e64585b995d31d926ec">>}]},
    {rtems, [{version, <<"5">>}]},
    {otp, [{version, <<"26.2.5.4">>}]}
]}.

Summary

Types

boot_info()

-type boot_info() :: #{boot := boot_source(), active := boot_system(), next := boot_system()}.

boot_source()

-type boot_source() :: sdcard | boot_system().

boot_system()

-type boot_system() :: system_a | system_b.

hardware_info()

-type hardware_info() ::
          #{platform := atom(),
            version := binary(),
            serial := binary(),
            batch := pos_integer(),
            pcb_variant := pos_integer(),
            pcb_version := binary(),
            prod_date := calendar:datetime()}.

software_info()

-type software_info() ::
          #{id := undefined | binary(),
            relname := undefined | binary(),
            relvsn := undefined | binary(),
            profiles := undefined | [atom()],
            toolchain_rev := undefined | binary(),
            rtems_ver := undefined | binary(),
            otp_ver := undefined | binary()}.

Functions

boot()

-spec boot() -> boot_info().

hardware()

-spec hardware() -> hardware_info().

software()

-spec software() -> software_info().

software(Source)

-spec software(Source :: boot_source()) -> software_info() | undefined.