A multifunctional and modular Firmware for Multitech's mDot based on ARM mBed provides a widerange of functionality for several Sensors such as MAX44009, BME280, MPU9250, SI1143 and uBlox. It allows you to quickly build a Sensornode that measures specific data with its sensors and sends it via LoRaWAN.

Dependencies:   mDot_LoRa_Sensornode_Flowmeter_impl mbed-rtos mbed

Embed: (wiki syntax)

« Back to documentation index

TaskPressure Class Reference

This TaskPressure Class handles the pressure measurement using the BME280. More...

#include <TaskPressure.h>

Inherits Task.

Public Member Functions

osStatus start ()
 Starts the task by building and its measurement.
osStatus stop ()
 Stops the task.
TASK_STATE getState ()
 Gets the actual state of the Task either RUNNING or SLEEPING.

Protected Member Functions

void attachIdleHook (void(*fptr)(void))
 Attaches the idle_hook for this task.
void setMutex (Mutex *mutexI2C)
 Sets the mutex thats used for a thread safe measurement.
void setPriority (osPriority priority)
 Sets the priority of the Task.
void setStackSize (uint32_t stackSize)
 Sets the size of the Task.
void setStackPointer (unsigned char *stackPointer)
 Sets the stack pointer of for the task stack.
void setState (TASK_STATE taskState)
 Sets the actual state of the Task.

Static Protected Member Functions

static void callBack (void const *)
 A Callback function thats called by the mbed::Thread of this TaskClass.

Detailed Description

This TaskPressure Class handles the pressure measurement using the BME280.

Starting the task using the start() starts the measurement. It can be used alongside with other measurement Tasks inside the mbed::rtos environment. The Task Class basically wraps mbeds Thread functionality.

Definition at line 24 of file TaskPressure.h.


Member Function Documentation

void attachIdleHook ( void(*)(void)  fptr ) [protected, inherited]

Attaches the idle_hook for this task.

Parameters:

Definition at line 38 of file Task.cpp.

void callBack ( void const *  data ) [static, protected, inherited]

A Callback function thats called by the mbed::Thread of this TaskClass.

Parameters:

Definition at line 30 of file Task.cpp.

TASK_STATE getState (  ) [inherited]

Gets the actual state of the Task either RUNNING or SLEEPING.

Returns:

Definition at line 62 of file Task.cpp.

void setMutex ( Mutex *  mutexI2C ) [protected, inherited]

Sets the mutex thats used for a thread safe measurement.

Parameters:
mutexI2Cthe I2C mutex

Definition at line 42 of file Task.cpp.

void setPriority ( osPriority  priority ) [protected, inherited]

Sets the priority of the Task.

Parameters:
prioritypriority of the Task

Definition at line 46 of file Task.cpp.

void setStackPointer ( unsigned char *  stackPointer ) [protected, inherited]

Sets the stack pointer of for the task stack.

Parameters:
stackPointer

Definition at line 54 of file Task.cpp.

void setStackSize ( uint32_t  stackSize ) [protected, inherited]

Sets the size of the Task.

Parameters:
stackSizethe stack size in Bytes

Definition at line 50 of file Task.cpp.

void setState ( TASK_STATE  taskState ) [protected, inherited]

Sets the actual state of the Task.

Parameters:
taskStateeither RUNNING or SLEEPING

Definition at line 58 of file Task.cpp.

osStatus start (  ) [inherited]

Starts the task by building and its measurement.

Returns:

Definition at line 19 of file Task.cpp.

osStatus stop (  ) [inherited]

Stops the task.

Should only be used after start() was used

Returns:

Definition at line 24 of file Task.cpp.