ParaLib 2.0.15-master SHA: 2e03d68caa
PARA_String.c File Reference

Parameter-Interface for connection with a PC. More...

#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "PARA_Lib.h"

Functions

int32_t PARA_ParseString (Parameter *p, int32_t SubId, char *input, uint8_t AccessLevel)
 Parse Parameter-data out of an input string. More...
 
int32_t PARA_ValAsString (Parameter *p, int32_t SubId, char *dest, int32_t MaxLength, uint8_t AccessLevel)
 Output the parameter value as formatted string. More...
 
int32_t PARA_ObjectToString (Parameter *p, object *data, char *dest, int32_t MaxLength)
 Parse Parameter-data out of an object. More...
 

Detailed Description

Parameter-Interface for connection with a PC.

Handling of String-Parameters.

Date
17.03.2022


© Copyright 2017-2022 Copyright: Retostronik GmbH Stütingstraße 30 58285 Gevelsberg

Function Documentation

◆ PARA_ObjectToString()

int32_t PARA_ObjectToString ( Parameter p,
object data,
char *  dest,
int32_t  MaxLength 
)

Parse Parameter-data out of an object.

This function is used to print the formatted string out of an object. The object is parsed considering the data-type of the parameter.

Parameters
pPointer to the parameter.
dataObject to be processed.
destOutput buffer
MaxLengthSize of the output buffer
Returns
Data size which is copiet into the output buffer

◆ PARA_ParseString()

int32_t PARA_ParseString ( Parameter p,
int32_t  SubId,
char *  input,
uint8_t  AccessLevel 
)

Parse Parameter-data out of an input string.

This function is used to store the binary parameter-value out of a string-value. The string is parsed considering the data-type of the parameter. Only used in serial parameter-interface.

Parameters
pPointer to the parameter.
SubIdSubID to be processed.
inputInput string
AccessLevelActual AccessLevel (see Access restrictions).
Returns
Data size which is stored into paramter data

◆ PARA_ValAsString()

int32_t PARA_ValAsString ( Parameter p,
int32_t  SubId,
char *  dest,
int32_t  MaxLength,
uint8_t  AccessLevel 
)

Output the parameter value as formatted string.

The Parameter-data is given as a formatted string considering the datatype of the parameter.

Parameters
pPointer to the parameter.
SubIdSubID to be processed.
destPOutput buffer
MaxLengthSize of the output buffer
AccessLevelActual AccessLevel (see Access restrictions).
Returns
Data size which is stored into output buffer