- Main
- Tutorials
- Library
- Samples

- File List
- Globals

Data Structures | Typedefs | Enumerations | Functions | Variables
sample_node_operator.c File Reference

Sample node operator More...

`#include <unistd.h>`
`#include <string.h>`
`#include <mx_node_sdk/mx_node_interface_basic.h>`
`#include <mx_node_sdk/mx_node_interface_data_access.h>`

Go to the source code of this file.

## Data Structures
struct | _MY_DATA

## Typedefs
typedef enum _OPERATOR_STATE | OPERATOR_STATE
| include interfaces More...
typedef struct _MY_DATA | MY_DATA

## Enumerations
enum | _OPERATOR_STATE { OPERATOR_STATE_STOP, OPERATOR_STATE_STOPPING, OPERATOR_STATE_RUNNING }
| include interfaces More...

## Functions
struct timeval | now ()
| custom function More...

## Variables
volatile OPERATOR_STATE | g_state
| custom variables More...
MY_DATA | g_my_node

## Detailed Description

Sample node operator

Copyright
  2019 Moxa Inc. All rights reserved.

Date
  2019-06-05

Author
  Rich Liao

Version
  V1.0

    Introduction:
    This is sample node operator code.

Definition in file sample_node_operator.c.

## Typedef Documentation

typedef enum _OPERATOR_STATE OPERATOR_STATE

include interfaces

custom types

typedef struct _MY_DATA MY_DATA

## Enumeration Type Documentation

enum _OPERATOR_STATE

include interfaces

custom types

Enumerator
OPERATOR_STATE_STOP |
OPERATOR_STATE_STOPPING |
OPERATOR_STATE_RUNNING |

Definition at line 33 of file sample_node_operator.c.

34 {
35 OPERATOR_STATE_STOP,
36 OPERATOR_STATE_STOPPING,
37 OPERATOR_STATE_RUNNING,
38 } OPERATOR_STATE;
OPERATOR_STATE_STOP
Definition: sample_node_operator.c:35
OPERATOR_STATE_STOPPING
Definition: sample_node_operator.c:36
OPERATOR_STATE
enum _OPERATOR_STATE OPERATOR_STATE
include interfaces
OPERATOR_STATE_RUNNING
Definition: sample_node_operator.c:37

## Function Documentation

struct timeval now | ( |  | ) |

custom function

Definition at line 48 of file sample_node_operator.c.

49 {
50 struct timeval t;
51 gettimeofday(&t, NULL);
52 return t;
53 }

## Variable Documentation

volatile OPERATOR_STATE g_state

custom variables

Definition at line 56 of file sample_node_operator.c.

MY_DATA g_my_node

Definition at line 57 of file sample_node_operator.c.