AiCPlayer
Interface of aic vm - for rendering aspect, sensors, video records
Data Structures | Macros | Typedefs | Functions
sensors.h File Reference

Defines ports and structures for sensor threads. More...

#include <stdint.h>
#include <pthread.h>
#include "buffer_sizes.h"
Include dependency graph for sensors.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  s_sensor_params
 Parameter for sensor threads. More...
 

Macros

#define PORT_SENSORS   22471
 Port for the "sensors" command in the VM. More...
 
#define PORT_BAT   22473
 Port for the battery command in the VM. More...
 
#define PORT_GPS   22475
 Port for the GPS command in the VM. More...
 
#define PORT_GSM   6704
 Port for the GSM command in the VM. More...
 
#define PORT_NFC   22800
 Port for the NFC command in the VM. More...
 
#define FREQ_SENSORS   100000
 
#define FREQ_BAT   2 * 1000000
 
#define FREQ_GPS   2 * 1000000
 
#define FREQ_DEFAULT   1 * 1000000
 

Typedefs

typedef struct s_sensor_params sensor_params
 Parameter for sensor threads. More...
 

Functions

sensor_paramsParamEventsWorker (const char *vmip, const char *vmid, const char *sensor_name, const char *amqp_host)
 Creates the data structure for sensor threads. More...
 
void start_sensor (sensor_params *params, pthread_t *thread)
 Start the sensor listener thread. More...
 

Detailed Description

Defines ports and structures for sensor threads.

Definition in file sensors.h.

Macro Definition Documentation

#define FREQ_BAT   2 * 1000000

Definition at line 21 of file sensors.h.

#define FREQ_DEFAULT   1 * 1000000

Definition at line 23 of file sensors.h.

#define FREQ_GPS   2 * 1000000

Definition at line 22 of file sensors.h.

#define FREQ_SENSORS   100000

Definition at line 20 of file sensors.h.

#define PORT_BAT   22473

Port for the battery command in the VM.

Definition at line 12 of file sensors.h.

#define PORT_GPS   22475

Port for the GPS command in the VM.

Definition at line 14 of file sensors.h.

#define PORT_GSM   6704

Port for the GSM command in the VM.

Definition at line 16 of file sensors.h.

#define PORT_NFC   22800

Port for the NFC command in the VM.

Definition at line 18 of file sensors.h.

#define PORT_SENSORS   22471

Port for the "sensors" command in the VM.

Definition at line 10 of file sensors.h.

Typedef Documentation

Parameter for sensor threads.

Function Documentation

sensor_params* ParamEventsWorker ( const char *  vmip,
const char *  vmid,
const char *  sensor_name,
const char *  amqp_host 
)

Creates the data structure for sensor threads.

Parameters
vmipIP address of the VM
vmidIdentifier of the VM
sensor_nameName of the sensor
amqp_hostHost of the RabbitMQ server
Returns
An initialized data structure.

Definition at line 105 of file sensors.c.

Here is the caller graph for this function:

void start_sensor ( sensor_params params,
pthread_t *  thread 
)

Start the sensor listener thread.

Parameters
paramsThe sensor parameter struct
threada reference to the thread to start

Definition at line 154 of file sensors.c.

Here is the caller graph for this function: