for connected embedded systems
![]() |
![]() |
![]() |
![]() |
PxConfigReadChar(), PxConfigReadCharCx()
Read a character parameter from a configuration file
Synopsis:
#include <photon/PxProto.h>
int PxConfigReadChar( const char *section,
const char *entry,
char dflt,
char *value );
int PxConfigReadCharCx( PxCfgContext_t *cx,
const char *section,
const char *entry,
char dflt,
char *value );
Arguments:
- cx
- PxConfigReadCharCx() only. The configuration file handle for the file you want to read from. This handle is returned by PxConfigOpenCx().
- section
- The section to read a boolean from.
If section is NULL, the function reads the value from entry in the current section. If section is a valid section name, it becomes the current section. - entry
- The entry to read the value from.
- dflt
- The default to store in value if the specified section or entry don't exist, or if the value is not a digit (signed and unsigned) within the char range, or a single letter,
- value
- A pointer to an char where the function stores the value it reads.
Library:
phexlib
Description:
These functions read a character parameter from a configuration file.
PxConfigReadChar() reads from the currently open configuration file opened by PxConfigOpen(), while PxConfigReadCharCx() reads from the configuration file indicated by cx.
Returns:
Pt_TRUE if the required section/entry exists and the given value is valid, otherwise Pt_FALSE.
Classification:
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
See also:
PxConfigOpen*(), PxConfigReadBool*(), PxConfigReadDouble*(), PxConfigReadInt*(), PxConfigReadLLong*(), PxConfigReadLong*(), PxConfigReadShort*(), PxConfigReadString*(), PxConfigWriteBool*(), PxConfigWriteChar*(), PxConfigWriteDouble*(), PxConfigWriteInt*(), PxConfigWriteLLong*(), PxConfigWriteLong*(), PxConfigWriteShort*(), PxConfigWriteString*()
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)