ISF  1.1
Intelligent Sensing Framework
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Include/isf_hostproxy.h File Reference

Definitions and types for the Host Proxy component. *. More...

#include "isf.h"
#include "isf_types.h"
#include "isf_init.h"
#include <lwevent.h>

Go to the source code of this file.

Data Structures

union  ctrl_reg_t
 The generic control register structure for user applications. More...
struct  hp_hostUpdate_struct
 This is the structure defined for the user application to update the host. More...
struct  hp_Interface_struct
 This is the structure for the host interface. Each user application needs to implement this interface, when utilizing the features of the Host Proxy. More...
struct  hp_ApplicationConfig_struct
 This structure configures a user application. More...
struct  hp_Config_struct
 This structure defines the host configuration which has multiple configured user applications. More...

Defines

#define EVENT_DATA_READY   0x1
 The common events handled by the Host Proxy.
#define EVENT_HOST_CONFIG   0x2
#define EVENT_BITMASK   0x3
#define MAX_APPS_ON_PROXY   0x8
#define MAX_EVENTS_PER_APPS   0x2
#define ISF_TASK_HP_INDEX   (ISF_TASK_INDEX_START + 4)
#define ISF_TASK_HP_STACK_SIZE   (512)
#define ISF_TASK_HP_PRIORITY   ISF_TASK_PRIORITY
#define ISF_TASK_HP_NAME   ("HostProxy")
#define ISF_TASK_HP_PARAM   (0)
#define ISF_TASK_HP_TIMESLICE   (0)
#define ISF_TASK_ATTRIBUTE_HOST_PROXY
 The definition of the ISF Host Proxy task-startup attributes macro. The developer inserts the task initialization macro into the structure :TASK_TEMPLATE_STRUCT MQX_template_list[] to launch a Host Proxy task.

Typedefs

typedef struct hp_hostUpdate_struct hp_hostUpdate_t
 This is the structure defined for the user application to update the host.
typedef struct hp_Interface_struct hp_Interface_t
 This is the structure for the host interface. Each user application needs to implement this interface, when utilizing the features of the Host Proxy.
typedef struct
hp_ApplicationConfig_struct 
hp_ApplicationConfig_t
 This structure configures a user application.
typedef struct hp_Config_struct hp_Config_t
 This structure defines the host configuration which has multiple configured user applications.

Enumerations

enum  hp_Error { HP_ERROR_MAXIUM_NO = 1, HP_ERROR_INVALID_PROXY, HP_ERROR_INVALID_EVENT }
 This enumeration defines the common Host Proxy errors. More...

Functions

void task_proxy (uint_32 param)
 The following macros and functions define the individual attributes for the ISF Host Proxy.
isf_status_t isf_hp_set_proxy_event (uint8 proxyNo, uint8 eventNo)
 This function sets an event for a proxy.
isf_status_t isf_hp_get_proxy_event (uint8 proxyNo, uint8 eventNo, uint32 *proxyEvent)
 This function gets the event for a proxy.

Variables

LWEVENT_STRUCT gProxyEvent

Detailed Description

Definitions and types for the Host Proxy component. *.

Definition in file isf_hostproxy.h.


Define Documentation

#define EVENT_BITMASK   0x3

The event bit masking for the Host Proxy.

Definition at line 68 of file isf_hostproxy.h.

#define EVENT_DATA_READY   0x1

The common events handled by the Host Proxy.

The data ready event.

Definition at line 66 of file isf_hostproxy.h.

#define EVENT_HOST_CONFIG   0x2

The application configuration event.

Definition at line 67 of file isf_hostproxy.h.

Value:
{ ISF_TASK_HP_INDEX, \
                                                                                                                                                                  task_proxy, \
                                                                                                                                                                  ISF_TASK_HP_STACK_SIZE, \
                                                                                                                                                                  ISF_TASK_HP_PRIORITY, \
                                                                                                                                                                  ISF_TASK_HP_NAME, \
                                          MQX_AUTO_START_TASK, \
                                          ISF_TASK_HP_PARAM, \
                                          ISF_TASK_HP_TIMESLICE   },

The definition of the ISF Host Proxy task-startup attributes macro. The developer inserts the task initialization macro into the structure :TASK_TEMPLATE_STRUCT MQX_template_list[] to launch a Host Proxy task.

Definition at line 90 of file isf_hostproxy.h.

Definition at line 79 of file isf_hostproxy.h.

#define ISF_TASK_HP_NAME   ("HostProxy")

Definition at line 82 of file isf_hostproxy.h.

#define ISF_TASK_HP_PARAM   (0)

Definition at line 83 of file isf_hostproxy.h.

Definition at line 81 of file isf_hostproxy.h.

#define ISF_TASK_HP_STACK_SIZE   (512)

Definition at line 80 of file isf_hostproxy.h.

#define ISF_TASK_HP_TIMESLICE   (0)

Definition at line 84 of file isf_hostproxy.h.

#define MAX_APPS_ON_PROXY   0x8

The maximum number of instances of user applications supported by the Host Proxy.

Definition at line 69 of file isf_hostproxy.h.

#define MAX_EVENTS_PER_APPS   0x2

The number of events for each user application.

Definition at line 70 of file isf_hostproxy.h.


Typedef Documentation

This structure configures a user application.

typedef struct hp_Config_struct hp_Config_t

This structure defines the host configuration which has multiple configured user applications.

This is the structure defined for the user application to update the host.

This is the structure for the host interface. Each user application needs to implement this interface, when utilizing the features of the Host Proxy.


Enumeration Type Documentation

enum hp_Error

This enumeration defines the common Host Proxy errors.

Enumerator:
HP_ERROR_MAXIUM_NO 

Error for exceeding the maximum number of user applications configured to the Host Proxy. The maximum number is 8.

HP_ERROR_INVALID_PROXY 

Error for using an invalid proxy.

HP_ERROR_INVALID_EVENT 

Error for passing an invalid event to a method.

Definition at line 19 of file isf_hostproxy.h.


Function Documentation

isf_status_t isf_hp_get_proxy_event ( uint8  proxyNo,
uint8  eventNo,
uint32 proxyEvent 
)

This function gets the event for a proxy.

An user application registered to the Host Proxy is called a proxy. This function obtains a proxy event for a proxy.

Parameters:
[in]proxyNoThe proxy number.
[in]eventNoThe event number.
[out]proxyEventThe proxy event for a specific proxy.
Returns:
isf_hp_get_proxy_event() returns a value of type isf_status_t indicating whether the operation was successful or unsuccessful.
Return values:
ISF_SUCCESSis returned when the an event is successfully retrieved.
HP_ERROR_INVALID_PROXYis returned when an invalid event proxy number is passed into the function.
HP_ERROR_INVALID_EVENTis returned when an invalid event number is passed into the function.
Constraints:
None
Reentrant: Yes
Link Libraries:
isf_core.lib
isf_status_t isf_hp_set_proxy_event ( uint8  proxyNo,
uint8  eventNo 
)

This function sets an event for a proxy.

An user application registered to the Host Proxy is called a proxy. When this function is called, an event is created internally based on the proxy number and the event number. The created event is set to the Host Proxy for notification.

Parameters:
[in]proxyNoThe proxy number
[in]eventNoThe event number
Returns:
isf_hp_set_proxy_event() returns a value of type isf_status_t indicating whether the operation was successful or unsuccessful.
Return values:
ISF_SUCCESSis returned when a proxy event is successfully set.
HP_ERROR_INVALID_PROXYis returned when an invalid event proxy number is passed into the function.
HP_ERROR_INVALID_EVENTis returned when an invalid event number is passed into the function.
Constraints:
None
Reentrant: Yes
Link Libraries:
isf_core.lib
void task_proxy ( uint_32  param)

The following macros and functions define the individual attributes for the ISF Host Proxy.


Variable Documentation

LWEVENT_STRUCT gProxyEvent

The handle for the Host Proxy events.