Robot Agent  1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Typedefs | Functions
enviroment.h File Reference

Go to the source code of this file.

Data Structures

union  s_ENVIROMENT_ROOM_POINT_UNION
 Room point definition - x, y. More...
 
struct  s_ENVIROMENT_TAG_STRUCT
 Tag definition - x, y, id. More...
 
struct  s_ENVIROMENT_STRUCT
 Enviroment Structure - room points, tags, room point number, tag number. More...
 

Macros

#define s_ENVIROMENT_TAG_ZEROS   -1
 
#define s_ENVIROMENT_TAG_UNKNOWN   -2
 
#define s_ENVIROMENT_TAG_DISABLED   -3
 

Typedefs

typedef union
s_ENVIROMENT_ROOM_POINT_UNION 
enviroment_room_point_t
 Room point definition - x, y. More...
 
typedef struct
s_ENVIROMENT_TAG_STRUCT 
enviroment_tag_t
 Tag definition - x, y, id. More...
 
typedef struct s_ENVIROMENT_STRUCT enviroment_t
 Enviroment Structure - room points, tags, room point number, tag number. More...
 

Functions

enviroment_tenviroment_load (char *room_def_path, char *tags_def_path)
 
void enviroment_destroy (enviroment_t *env)
 
int enviroment_room_load (enviroment_room_point_t **room, const char *filename)
 
int enviroment_tags_load (enviroment_tag_t **tags, const char *filename)
 
void enviroment_calc_room_dimensions (enviroment_t *env)
 
int enviroment_tag_check (enviroment_t *env, char tag_id[11])
 

Detailed Description

Author
Eriks Zaharans
Date
1 Jul 2013

DESCRIPTION

Enviroment related function library header file.

Definition in file enviroment.h.

Macro Definition Documentation

#define s_ENVIROMENT_TAG_DISABLED   -3

Definition at line 65 of file enviroment.h.

#define s_ENVIROMENT_TAG_UNKNOWN   -2

Definition at line 64 of file enviroment.h.

#define s_ENVIROMENT_TAG_ZEROS   -1

Definition at line 63 of file enviroment.h.

Typedef Documentation

Room point definition - x, y.

Enviroment Structure - room points, tags, room point number, tag number.

Tag definition - x, y, id.

Function Documentation

void enviroment_calc_room_dimensions ( enviroment_t env)

Calculate room dimensions

Parameters
envEnviroment structure
Returns
Void

Definition at line 190 of file enviroment.c.

void enviroment_destroy ( enviroment_t env)

Free dynamicly allocated memory

Parameters
envEnviroment structure
Returns
Void

Definition at line 50 of file enviroment.c.

enviroment_t* enviroment_load ( char *  room_def_path,
char *  tags_def_path 
)

Load enviroment definitions

Parameters
room_def_pathPath to room definition
tags_def_pathPath to tags definition
Returns
Pointer to enviroment structure

Definition at line 31 of file enviroment.c.

int enviroment_room_load ( enviroment_room_point_t **  room,
const char *  filename 
)

Load room definition

Parameters
roomPointer to pointer of room definition array
filenamePath to the file containing room definition
Returns
Number of points

Definition at line 66 of file enviroment.c.

int enviroment_tag_check ( enviroment_t env,
char  tag_id[11] 
)

Check weather RFID tag exists in enviroment

Parameters
envPointer to enviroment structure
Returns
Return tag number in array if found, s_ENVIROMENT_TAG_ZEROS if zeros, s_ENVIROMENT_TAG_UNKNOWN if unknown

Definition at line 219 of file enviroment.c.

int enviroment_tags_load ( enviroment_tag_t **  tags,
const char *  filename 
)

Load tags

Parameters
tagsPointer to pointer of tag array
filenamePath to the file containing RFID tag definition
Returns
Number of tags

Definition at line 123 of file enviroment.c.