Hubo Library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Macros | Functions | Variables
JamDemo.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   (25.0)
 
#define TEMP_OFF   (27.0)
 
#define PIR_DI_CHANNEL   (7)
 
#define SLAVE_INDEX   (0)
 
#define REED_DI_CHANNEL   (6)
 
#define MOTOR_DO_CHANNEL   (1)
 

Functions

bool InitializeApplication ()
 
bool SaveThreadPriority ()
 
void BoostThreadPriority ()
 
void RestoreThreadPriority ()
 
bool Initialize1WireDevices ()
 
bool InitializeHuboHardware ()
 
void TemperatureControl ()
 
bool GetTemperature (double &temperature)
 
void PIRCounter ()
 
void HandleReedContact ()
 
int main (int argc, char *argv[])
 
bool strToUChar (char *str, unsigned char &value)
 

Variables

sched_param g_param
 
int g_policy = 0
 
pthread_t g_threadHandle = 0
 
CSC5262 rcSwitch (350, 17, true)
 
vector< string > g_1WireDeviceList
 
int g_FirstDS18x20Sensor = -1
 
vector< int > g_SlaveAddressList
 
unsigned short g_Count = 0
 

Macro Definition Documentation

#define FAMILY_CODE   (31)

Definition at line 39 of file JamDemo.cpp.

#define MOTOR_DO_CHANNEL   (1)

Definition at line 70 of file JamDemo.cpp.

#define PIR_DI_CHANNEL   (7)

Definition at line 64 of file JamDemo.cpp.

#define REED_CONTACT_SOCKET   (2)

Definition at line 41 of file JamDemo.cpp.

#define REED_DI_CHANNEL   (6)

Definition at line 69 of file JamDemo.cpp.

#define SLAVE_INDEX   (0)

Definition at line 65 of file JamDemo.cpp.

#define TEMP_CONTROLLER_SOCKET   (1)

Definition at line 40 of file JamDemo.cpp.

#define TEMP_OFF   (27.0)

Definition at line 59 of file JamDemo.cpp.

#define TEMP_ON   (25.0)

Definition at line 58 of file JamDemo.cpp.

Function Documentation

void BoostThreadPriority ( )

Definition at line 329 of file JamDemo.cpp.

bool GetTemperature ( double &  temperature)

Definition at line 168 of file JamDemo.cpp.

void HandleReedContact ( )

Definition at line 103 of file JamDemo.cpp.

bool Initialize1WireDevices ( )

Definition at line 277 of file JamDemo.cpp.

bool InitializeApplication ( )

Definition at line 199 of file JamDemo.cpp.

bool InitializeHuboHardware ( )

Definition at line 233 of file JamDemo.cpp.

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

Definition at line 73 of file JamDemo.cpp.

void PIRCounter ( )

Definition at line 120 of file JamDemo.cpp.

void RestoreThreadPriority ( )

Definition at line 340 of file JamDemo.cpp.

bool SaveThreadPriority ( )

Definition at line 315 of file JamDemo.cpp.

bool strToUChar ( char *  str,
unsigned char &  value 
)

Definition at line 347 of file JamDemo.cpp.

void TemperatureControl ( )

Definition at line 139 of file JamDemo.cpp.

Variable Documentation

vector<string> g_1WireDeviceList

Definition at line 46 of file JamDemo.cpp.

unsigned short g_Count = 0

Definition at line 63 of file JamDemo.cpp.

int g_FirstDS18x20Sensor = -1

Definition at line 47 of file JamDemo.cpp.

sched_param g_param

Definition at line 34 of file JamDemo.cpp.

int g_policy = 0

Definition at line 35 of file JamDemo.cpp.

vector<int> g_SlaveAddressList

Definition at line 51 of file JamDemo.cpp.

pthread_t g_threadHandle = 0

Definition at line 36 of file JamDemo.cpp.

CSC5262 rcSwitch(350, 17, true)