Filter results by

Older Versions

Older API versions are available as a download. To view, extract the file and open the index.html file in a web browser.

artik_loop.h File Reference

LOOP module definition. More...

#include "artik_error.h"
#include "artik_types.h"

Go to the source code of this file.

Data Structures

struct  artik_loop_module
 Loop module operations. More...
 

Typedefs

typedef void(* timeout_callback) (void *user_data)
 This callback function gets triggered after timeout. More...
 
typedef int(* periodic_callback) (void *user_data)
 This callback function gets triggered after periodic. More...
 
typedef int(* idle_callback) (void *user_data)
 This callback function gets triggered after idle. More...
 
typedef int(* watch_callback) (int fd, enum watch_io io, void *user_data)
 Watch callback prototype. More...
 
typedef int(* signal_callback) (void *user_data)
 

Enumerations

enum  watch_io {
  WATCH_IO_IN = (1 << 0), WATCH_IO_OUT = (1 << 1), WATCH_IO_PRI = (1 << 2), WATCH_IO_ERR = (1 << 3),
  WATCH_IO_HUP = (1 << 4), WATCH_IO_NVAL = (1 << 5)
}
 

Variables

const artik_loop_module loop_module
 

Detailed Description

Definitions and functions for using the loop module and working with the SDK's main loop and asynchronous mechanisms.

Definition in file artik_loop.h.

Typedef Documentation

typedef int(* idle_callback) (void *user_data)
Parameters
[in]user_dataThe user data passed from the register callback function
Returns
continue calling the idle. 1 re-new idle, 0 cancel idle.

Definition at line 68 of file artik_loop.h.

typedef int(* periodic_callback) (void *user_data)
Parameters
[in]user_dataThe user data passed from the register callback function
Returns
continue calling the periodic. 1 re-new periodic, 0 cancel periodic.

Definition at line 61 of file artik_loop.h.

typedef void(* timeout_callback) (void *user_data)
Parameters
[in]user_dataThe user data passed from the register callback function

Definition at line 54 of file artik_loop.h.

typedef int(* watch_callback) (int fd, enum watch_io io, void *user_data)
Parameters
[in]fdfile descriptor
[in]ioi/o event condition
[in]user_dataThe user data passed from the callback function
Returns
continue using the watch callback. 1 continue use, 0 remove the watch callback.

Definition at line 78 of file artik_loop.h.

Enumeration Type Documentation

enum watch_io
Enumerator
WATCH_IO_IN 

data input available

WATCH_IO_OUT 

data can be written

WATCH_IO_PRI 

high priority input available

WATCH_IO_ERR 

i/o error

WATCH_IO_HUP 

Hung up. device disconnected

WATCH_IO_NVAL 

invalid request. the file descriptor is not open

Definition at line 40 of file artik_loop.h.

Last updated on: