WizziLab / modem_ref

Dependents:   modem_ref_helper

Embed: (wiki syntax)

« Back to documentation index

alp_helpers.h File Reference

alp_helpers.h File Reference

========================================================================={{{ Copyright (c) 2012-2020 WizziLab / All rights reserved / / =========================================================================}}} More...

Go to the source code of this file.

Functions

uint alp_size (u8 op, u32 offset, u32 length)
 Return payload length of most ALP operations.
u8 alp_encode_length (u8 *p, u32 len)
 Encodes an ALP length/offset field.
u32 alp_decode_length (u8 **p, u8 *actp)
 Decodes an ALP length/offset field.
int alp_parse_chunk (u8 **payload, alp_parsed_chunk_t *resp)
 Parses an ALP response payload to a more generic alp_parsed_chunk_t structure.

Detailed Description

========================================================================={{{ Copyright (c) 2012-2020 WizziLab / All rights reserved / / =========================================================================}}}

Definition in file alp_helpers.h.


Function Documentation

u32 alp_decode_length ( u8 **  p,
u8 *  actp 
)

Decodes an ALP length/offset field.

Parameters:
p: pointer to the pointer to payload buffer
actp: pointer to ALP's Action Protocol Substitution flag Result amongst alp_actp_substitution_mode_t
Return values:
decodedvalue

Definition at line 120 of file alp_helpers.cpp.

u8 alp_encode_length ( u8 *  p,
u32  len 
)

Encodes an ALP length/offset field.

Parameters:
p: pointer to the payload buffer
len: value to be encoded
Return values:
resultingpayload size in bytes

Definition at line 80 of file alp_helpers.cpp.

int alp_parse_chunk ( u8 **  payload,
alp_parsed_chunk_t *  resp 
)

Parses an ALP response payload to a more generic alp_parsed_chunk_t structure.

Parameters:
payload: pointer to the pointer to payload buffer
resp: pointer to alp_parsed_chunk_t structure
Return values:
numberof parsed bytes

Parses an ALP response payload to a more generic alp_parsed_chunk_t structure.

Parameters:
payload: pointer to the pointer to payload buffer
resp: pointer to alp_parsed_chunk_t structure
Return values:
numberof parsed bytes

Definition at line 200 of file alp_helpers.cpp.

uint alp_size ( u8  op,
u32  offset,
u32  length 
)

Return payload length of most ALP operations.

Parameters:
op: ALP Action amongst alp_opcodes_t
offset: Associated Offset if relevant
size: Associated Size if relevant
Return values:
payloadsize in bytes

Return payload length of most ALP operations.

/ / =========================================================================}}} Return payload length of most ALP operations

Parameters:
op: ALP Action amongst alp_opcodes_t
offset: Associated Offset if relevant
size: Associated Size if relevant
Return values:
payloadsize in bytes

Definition at line 36 of file alp_helpers.cpp.