| ISF 1.1 Intelligent Sensing Framework

- Main Page
- Data Structures
- Files
- Sensor Adapters

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Data Structures | Defines | Typedefs | Enumerations | Functions | Variables
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.

#define ISF_TASK_ATTRIBUTE_HOST_PROXY

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.

#define ISF_TASK_HP_INDEX (ISF_TASK_INDEX_START + 4)

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.

#define ISF_TASK_HP_PRIORITY ISF_TASK_PRIORITY

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

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.

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.

## 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] | proxyNo | The proxy number.
  [in] | eventNo | The event number.
  [out] | proxyEvent | The 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_SUCCESS | is returned when the an event is successfully retrieved.
  HP_ERROR_INVALID_PROXY | is returned when an invalid event proxy number is passed into the function.
  HP_ERROR_INVALID_EVENT | is 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] | proxyNo | The proxy number
  [in] | eventNo | The 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_SUCCESS | is returned when a proxy event is successfully set.
  HP_ERROR_INVALID_PROXY | is returned when an invalid event proxy number is passed into the function.
  HP_ERROR_INVALID_EVENT | is 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.