ParaLib 2.0.15-master SHA: 2e03d68caa
PARA_Parameter.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

uint32_t GetParameterCount (void)
 Get the number of the existent parameters. More...
 
uint32_t GetGroupCount (void)
 Get the number of the existent parameter-groups. More...
 
ParameterGetParameter (uint32_t ParaID)
 Get the parameter of the given ID. More...
 
GroupGetGroup (uint32_t GroupID)
 Get the parameter-Group of the given ID. More...
 
int32_t GetDataTypeSize (uint8_t Type)
 Calculate the Size of a parameter-type. More...
 
ParameterGetNextParaID (uint16_t ParaID, uint16_t GruppenID)
 Get next parameter in parameter-list. More...
 
uint32_t GetStringParameterLength (Parameter *p, uint16_t subID)
 Get the length of the string data of the given parameter. More...
 

Variables

int32_t ANZAHL_PARAMETER
 Number of existent parameters. Must be defined in main program. More...
 
const int32_t ANZAHL_GRUPPEN
 Number of existent parameter-groups. Must be defined in main program. More...
 

Detailed Description

Parameter Interface for connection with a PC.


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

Function Documentation

◆ GetDataTypeSize()

int32_t GetDataTypeSize ( uint8_t  Type)

Calculate the Size of a parameter-type.

Parameters
TypeParameter-Type
Returns
Size in Bytes of the given Parameter-Type

◆ GetGroup()

Group * GetGroup ( uint32_t  GroupID)

Get the parameter-Group of the given ID.

The group is searched accourding the given Group-ID.

Parameters
GroupIDID of the searched Group
Returns
found Group or 0 if not existent.

◆ GetGroupCount()

uint32_t GetGroupCount ( void  )

Get the number of the existent parameter-groups.

The number of groups must be defined in main progframm in the constant ANZAHL_GRUPPEN

Returns
Number of Groups

◆ GetNextParaID()

Parameter * GetNextParaID ( uint16_t  ParaID,
uint16_t  GruppenID 
)

Get next parameter in parameter-list.

The next entry in parameter-list after the current parameter-id in the given Parameter-group is given .

Parameters
ParaIDParameter-ID of the actual Parameter.
GruppenIDGroup-ID of the searched Parameter-Group.
Returns
Found parameter or 0

◆ GetParameter()

Parameter * GetParameter ( uint32_t  ParaID)

Get the parameter of the given ID.

The Parameter is searched accourding the given Parameter-ID.

Parameters
ParaIDID of the searched Parameter
Returns
found Parameter or 0 if not existent.

◆ GetParameterCount()

uint32_t GetParameterCount ( void  )

Get the number of the existent parameters.

The number of parameters must be defined in main progframm in the constant ANZAHL_PARAMETER

Returns
Number of Parameters

◆ GetStringParameterLength()

uint32_t GetStringParameterLength ( Parameter p,
uint16_t  subID 
)

Get the length of the string data of the given parameter.

If the parameter is not a string-type, the output value is nonsense!

Parameters
pactual Parameter.
subIDSub-ID of the parameter
Returns
Length of the data string.

Variable Documentation

◆ ANZAHL_GRUPPEN

const int32_t ANZAHL_GRUPPEN
extern

Number of existent parameter-groups. Must be defined in main program.

◆ ANZAHL_PARAMETER

int32_t ANZAHL_PARAMETER
extern

Number of existent parameters. Must be defined in main program.