Hubo Library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Macros | Functions | Variables
TempController.cpp File Reference
#include <stdio.h>
#include <assert.h>
#include <pthread.h>
#include "../hubolib.h"
#include "../hubocfg.h"
#include "CSC5262.h"

Go to the source code of this file.

Macros

#define FAMILY_CODE   (31)
 
#define TEMP_CONTROLLER_SOCKET   (1)
 
#define REED_CONTACT_SOCKET   (2)
 
#define TEMP_ON   (27.0)
 
#define TEMP_OFF   (29.0)
 
#define TEMP_SENSOR_AI_CHANNEL   (0)
 
#define TEMP_CONTROLLER_RELAY   (7)
 
#define LIGHT_OFF   (2000)
 
#define LIGHT_ON   (2500)
 
#define LIGHT_SENSOR_AI_CHANNEL   (1)
 
#define LIGHT_CONTROLLER_RELAY   (6)
 

Functions

bool InitializeApplication ()
 
bool InitializeHuboHardware ()
 
bool SaveThreadPriority ()
 
void BoostThreadPriority ()
 
void RestoreThreadPriority ()
 
void TemperatureControl ()
 
bool GetTemperature (int channel, double &temperature)
 
void BrightnessControl ()
 
bool GetDarkness (int channel, unsigned short &brightness)
 
int main (int argc, char *argv[])
 

Variables

sched_param g_param
 
int g_policy = 0
 
pthread_t g_threadHandle = 0
 
CSC5262 rcSwitch (350, 17, true)
 

Macro Definition Documentation

#define FAMILY_CODE   (31)

Definition at line 42 of file TempController.cpp.

#define LIGHT_CONTROLLER_RELAY   (6)

Definition at line 65 of file TempController.cpp.

#define LIGHT_OFF   (2000)

Definition at line 62 of file TempController.cpp.

#define LIGHT_ON   (2500)

Definition at line 63 of file TempController.cpp.

#define LIGHT_SENSOR_AI_CHANNEL   (1)

Definition at line 64 of file TempController.cpp.

#define REED_CONTACT_SOCKET   (2)

Definition at line 44 of file TempController.cpp.

#define TEMP_CONTROLLER_RELAY   (7)

Definition at line 55 of file TempController.cpp.

#define TEMP_CONTROLLER_SOCKET   (1)

Definition at line 43 of file TempController.cpp.

#define TEMP_OFF   (29.0)

Definition at line 53 of file TempController.cpp.

#define TEMP_ON   (27.0)

Definition at line 52 of file TempController.cpp.

#define TEMP_SENSOR_AI_CHANNEL   (0)

Definition at line 54 of file TempController.cpp.

Function Documentation

void BoostThreadPriority ( )

Definition at line 251 of file TempController.cpp.

void BrightnessControl ( )

Definition at line 95 of file TempController.cpp.

bool GetDarkness ( int  channel,
unsigned short &  brightness 
)

Definition at line 118 of file TempController.cpp.

bool GetTemperature ( int  channel,
double &  temperature 
)

Definition at line 166 of file TempController.cpp.

bool InitializeApplication ( )

Definition at line 179 of file TempController.cpp.

bool InitializeHuboHardware ( )

Definition at line 206 of file TempController.cpp.

int main ( int  argc,
char *  argv[] 
)

Definition at line 68 of file TempController.cpp.

void RestoreThreadPriority ( )

Definition at line 262 of file TempController.cpp.

bool SaveThreadPriority ( )

Definition at line 237 of file TempController.cpp.

void TemperatureControl ( )

Definition at line 131 of file TempController.cpp.

Variable Documentation

sched_param g_param

Definition at line 37 of file TempController.cpp.

int g_policy = 0

Definition at line 38 of file TempController.cpp.

pthread_t g_threadHandle = 0

Definition at line 39 of file TempController.cpp.

CSC5262 rcSwitch(350, 17, true)