Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
tlv_use_case_dynamic_descriptor.c File Reference
#include <stdint.h>
#include <string.h>
#include <ctype.h>
#include "os_utils.h"
#include "ox_ec.h"
#include "os_pic.h"
#include "os_app.h"
#include "cx.h"
#include "os_pki.h"
#include "ledger_pki.h"
#include "tlv_use_case_dynamic_descriptor.h"
Include dependency graph for tlv_use_case_dynamic_descriptor.c:

Go to the source code of this file.

Classes

struct  tlv_extracted_s
 

Macros

#define TYPE_DYNAMIC_TOKEN   0x90
 
#define TLV_TAGS(X)
 

Typedefs

typedef struct tlv_extracted_s tlv_extracted_t
 

Functions

static bool handle_structure_type (const tlv_data_t *data, tlv_extracted_t *tlv_extracted)
 
static bool handle_version (const tlv_data_t *data, tlv_extracted_t *tlv_extracted)
 
static bool handle_coin_type (const tlv_data_t *data, tlv_extracted_t *tlv_extracted)
 
static bool handle_application_name (const tlv_data_t *data, tlv_extracted_t *tlv_extracted)
 
static bool handle_ticker (const tlv_data_t *data, tlv_extracted_t *tlv_extracted)
 
static bool handle_magnitude (const tlv_data_t *data, tlv_extracted_t *tlv_extracted)
 
static bool handle_tuid (const tlv_data_t *data, tlv_extracted_t *tlv_extracted)
 
static bool handle_signature (const tlv_data_t *data, tlv_extracted_t *tlv_extracted)
 
static bool handle_common (const tlv_data_t *data, tlv_extracted_t *tlv_extracted)
 
tlv_dynamic_descriptor_status_t tlv_use_case_dynamic_descriptor (const buffer_t *payload, tlv_dynamic_descriptor_out_t *out)
 Processes a TLV dynamic descriptor use case.
 

Macro Definition Documentation

◆ TLV_TAGS

#define TLV_TAGS (   X)
Value:
X(0x01, TAG_STRUCTURE_TYPE, handle_structure_type, ENFORCE_UNIQUE_TAG) \
X(0x02, TAG_VERSION, handle_version, ENFORCE_UNIQUE_TAG) \
X(0x03, TAG_COIN_TYPE, handle_coin_type, ENFORCE_UNIQUE_TAG) \
X(0x04, TAG_APPLICATION_NAME, handle_application_name, ENFORCE_UNIQUE_TAG) \
X(0x05, TAG_TICKER, handle_ticker, ENFORCE_UNIQUE_TAG) \
X(0x06, TAG_MAGNITUDE, handle_magnitude, ENFORCE_UNIQUE_TAG) \
X(0x07, TAG_TUID, handle_tuid, ENFORCE_UNIQUE_TAG) \
X(0x08, TAG_SIGNATURE, handle_signature, ENFORCE_UNIQUE_TAG)
@ ENFORCE_UNIQUE_TAG
static bool handle_signature(const tlv_data_t *data, tlv_extracted_t *tlv_extracted)
static bool handle_coin_type(const tlv_data_t *data, tlv_extracted_t *tlv_extracted)
static bool handle_application_name(const tlv_data_t *data, tlv_extracted_t *tlv_extracted)
static bool handle_tuid(const tlv_data_t *data, tlv_extracted_t *tlv_extracted)
static bool handle_version(const tlv_data_t *data, tlv_extracted_t *tlv_extracted)
static bool handle_magnitude(const tlv_data_t *data, tlv_extracted_t *tlv_extracted)
static bool handle_ticker(const tlv_data_t *data, tlv_extracted_t *tlv_extracted)
static bool handle_structure_type(const tlv_data_t *data, tlv_extracted_t *tlv_extracted)

Definition at line 97 of file tlv_use_case_dynamic_descriptor.c.

◆ TYPE_DYNAMIC_TOKEN

#define TYPE_DYNAMIC_TOKEN   0x90

Definition at line 30 of file tlv_use_case_dynamic_descriptor.c.

Typedef Documentation

◆ tlv_extracted_t

Function Documentation

◆ handle_application_name()

static bool handle_application_name ( const tlv_data_t data,
tlv_extracted_t tlv_extracted 
)
static

Definition at line 65 of file tlv_use_case_dynamic_descriptor.c.

◆ handle_coin_type()

static bool handle_coin_type ( const tlv_data_t data,
tlv_extracted_t tlv_extracted 
)
static

Definition at line 60 of file tlv_use_case_dynamic_descriptor.c.

◆ handle_common()

static bool handle_common ( const tlv_data_t data,
tlv_extracted_t tlv_extracted 
)
static

Definition at line 110 of file tlv_use_case_dynamic_descriptor.c.

◆ handle_magnitude()

static bool handle_magnitude ( const tlv_data_t data,
tlv_extracted_t tlv_extracted 
)
static

Definition at line 77 of file tlv_use_case_dynamic_descriptor.c.

◆ handle_signature()

static bool handle_signature ( const tlv_data_t data,
tlv_extracted_t tlv_extracted 
)
static

Definition at line 87 of file tlv_use_case_dynamic_descriptor.c.

◆ handle_structure_type()

static bool handle_structure_type ( const tlv_data_t data,
tlv_extracted_t tlv_extracted 
)
static

Definition at line 50 of file tlv_use_case_dynamic_descriptor.c.

◆ handle_ticker()

static bool handle_ticker ( const tlv_data_t data,
tlv_extracted_t tlv_extracted 
)
static

Definition at line 71 of file tlv_use_case_dynamic_descriptor.c.

◆ handle_tuid()

static bool handle_tuid ( const tlv_data_t data,
tlv_extracted_t tlv_extracted 
)
static

Definition at line 82 of file tlv_use_case_dynamic_descriptor.c.

◆ handle_version()

static bool handle_version ( const tlv_data_t data,
tlv_extracted_t tlv_extracted 
)
static

Definition at line 55 of file tlv_use_case_dynamic_descriptor.c.

◆ tlv_use_case_dynamic_descriptor()

tlv_dynamic_descriptor_status_t tlv_use_case_dynamic_descriptor ( const buffer_t payload,
tlv_dynamic_descriptor_out_t out 
)

Processes a TLV dynamic descriptor use case.

This function parses the provided payload buffer and extracts dynamic descriptor information, storing the results in the output structure.

Parameters
[in]payloadPointer to the buffer containing the TLV payload data.
[out]outPointer to the structure where the parsed dynamic descriptor will be stored.
Returns
Status code indicating the result of the operation. See tlv_dynamic_descriptor_status_t for possible values.

Definition at line 119 of file tlv_use_case_dynamic_descriptor.c.