Config

class config.Config(cfgFile)[source]

Bases: object

Config class.

Get and validate configuration parameters from a configuration file based on YAML.

getDebugLevel()[source]

Get debug level.

Parameters:

None

Returns:

Debug level.

Return type:

int

getLoRaAuthMode()[source]

Get LoRa authentication mode.

Parameters:

None

Returns:

LoRa authentication mode.

Return type:

str

getLoRaBaseBand()[source]

Get LoRa base band.

Parameters:

None

Returns:

LoRa base band.

Return type:

str

getLoRaClass()[source]

Get LoRa class.

Parameters:

None

Returns:

LoRa class.

Return type:

str

getLoRaModule()[source]

Get LoRa module type.

Parameters:

None

Returns:

LoRa module type.

Return type:

str

getLoRaRXWin2DR()[source]

Get LoRa RX window 2 data rate.

Parameters:

None

Returns:

LoRa RX window 2 data rate.

Return type:

int

getLoRaRXWin2Freq()[source]

Get LoRa RX window 2 frequency.

Parameters:

None

Returns:

LoRa RX window 2 frequency.

Return type:

int

getLoRaSubBand()[source]

Get LoRa sub band.

Parameters:

None

Returns:

LoRa sub band.

Return type:

str

getProjectConfig(projectName)[source]

Get project configuration.

Parameters:

projectName (str) – Project name.

Returns:

Project configuration.

Return type:

dict

getSerialBaudrate()[source]

Get serial baudrate.

Parameters:

None

Returns:

Serial baudrate.

Return type:

int

getSerialPort()[source]

Get serial port path.

Parameters:

None

Returns:

Serial port path.

Return type:

str

readConfigFile(configFile)[source]

Read the configuration file.

Parameters:

configFile (str) – Configuration file path.

Returns:

Configuration tree (from YAML object).

Return type:

(dict)