⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 statcode.h

📁 Open DMT Client C Source code
💻 H
📖 第 1 页 / 共 2 页
字号:
// ----------------------------------------------------------------------------// Copyright 2006-2007, Martin D. Flynn// All rights reserved// ----------------------------------------------------------------------------//// Licensed under the Apache License, Version 2.0 (the "License");// you may not use this file except in compliance with the License.// You may obtain a copy of the License at// // http://www.apache.org/licenses/LICENSE-2.0// // Unless required by applicable law or agreed to in writing, software// distributed under the License is distributed on an "AS IS" BASIS,// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.// See the License for the specific language governing permissions and// limitations under the License.//// ----------------------------------------------------------------------------// Description://  OpenDMTP protocol status code constants.// ----------------------------------------------------------------------------// Change History://  2006/03/31  Martin D. Flynn//     -Added new status codes://      STATUS_INITIALIZED, STATUS_WAYMARK//  2007/01/28  Martin D. Flynn//     -WindowsCE port//     -Added new status codes://      STATUS_QUERY, STATUS_LOW_BATTERY, STATUS_OBC_FAULT, STATUS_OBC_RANGE,//      STATUS_OBC_RPM_RANGE, STATUS_OBC_FUEL_RANGE, STATUS_OBC_OIL_RANGE,//      STATUS_OBC_TEMP_RANGE, STATUS_MOTION_MOVING//  2007/??/??  Martin D. Flynn//     -Added new status code: STATUS_POWER_FAILURE// ----------------------------------------------------------------------------#ifndef _STATUS_CODES_H#define _STATUS_CODES_H#ifdef __cplusplusextern "C" {#endif#include "tools/stdtypes.h"// ----------------------------------------------------------------------------// Reserved status codes: [E0-00 through FF-FF]// Groups://      0xF0..  - Generic//      0xF1..  - Motion//      0xF2..  - Geofence//      0xF4..  - Digital input/output//      0xF6..  - Sensor input//      0xF7..  - Temperature input//      0xF8..  - Miscellaneous//      0xF9..  - J1708//      0xFD..  - Device status// ----------------------------------------------------------------------------typedef UInt16          StatusCode_t;// ----------------------------------------------------------------------------// No status code: 0x0000#define STATUS_NONE                 0x0000// ----------------------------------------------------------------------------// Generic codes: 0xF000 to 0xF0FF#define STATUS_INITIALIZED          0xF010    // Description:    //      General Status/Location information (event generated by some    //      initialization function performed by the device).    // Notes:    //      - This contents of the payload must at least contain the current    //      timestamp (and latitude and longitude if available).#define STATUS_LOCATION             0xF020    // Description:    //      General Status/Location information    // Notes:    //      - This contents of the payload must at least contain the current    //      timestamp, latitude, and longitude.#define STATUS_WAYMARK              0xF030    // Description:    //      General Status/Location information (event generated by manual user    //      intervention at the device. ie. pressing a 'Waymark' button).    // Notes:    //      - This contents of the payload must at least contain the current    //      timestamp, latitude, and longitude.#define STATUS_QUERY                0xF040    // Description:    //      General Status/Location information (event generated by a 'query'    //      request from the server).    // Notes:    //      - This contents of the payload must at least contain the current    //      timestamp, latitude, and longitude.// ----------------------------------------------------------------------------// Motion codes: 0xF100 to 0xF1FF#define STATUS_MOTION_START         0xF111    // Description:    //      Device start of motion    // Notes:    //      - The definition of motion-start is provided by property PROP_MOTION_START#define STATUS_MOTION_IN_MOTION     0xF112    // Description:    //      Device in-motion interval    // Notes:    //      - The in-motion interval is provided by property PROP_MOTION_IN_MOTION.    //      - This status is typically used for providing in-motion events between    //      STATUS_MOTION_START and STATUS_MOTION_STOP events.#define STATUS_MOTION_STOP          0xF113    // Description:    //      Device stopped motion    // Notes:    //      - The definition of motion-stop is provided by property PROP_MOTION_STOP#define STATUS_MOTION_DORMANT       0xF114    // Description:    //      Device dormant interval (ie. not moving)    // Notes:    //      - The dormant interval is provided by property PROP_MOTION_DORMANT#define STATUS_MOTION_EXCESS_SPEED  0xF11A    // Description:    //      Device exceeded preset speed limit    // Notes:    //      - The excess-speed threshold is provided by property PROP_MOTION_EXCESS_SPEED    //      - The 'speed' field should be checked for the actual speed of the vehicle.#define STATUS_MOTION_MOVING        0xF11C    // Description:    //      Device is moving    // Notes:    //      - This status code may be used to indicating that the device was moving    //      at the time the event was generated. It is typically not associated    //      with the status codes STATUS_MOTION_START, STATUS_MOTION_STOP, and      //      STATUS_MOTION_IN_MOTION, and may be used independently of these codes.    //      - This status code is typically used for devices that need to periodically    //      report that they are moving, apart from the standard start/stop/in-motion    //      events.#define STATUS_ODOM_0               0xF130#define STATUS_ODOM_1               0xF131#define STATUS_ODOM_2               0xF132#define STATUS_ODOM_3               0xF133#define STATUS_ODOM_4               0xF134#define STATUS_ODOM_5               0xF135#define STATUS_ODOM_6               0xF136#define STATUS_ODOM_7               0xF137    // Description:    //      Odometer value    // Notes:    //      The odometer limit is provided by property PROP_ODOMETER_#_LIMIT#define STATUS_ODOM_LIMIT_0         0xF140#define STATUS_ODOM_LIMIT_1         0xF141#define STATUS_ODOM_LIMIT_2         0xF142#define STATUS_ODOM_LIMIT_3         0xF143#define STATUS_ODOM_LIMIT_4         0xF144#define STATUS_ODOM_LIMIT_5         0xF145#define STATUS_ODOM_LIMIT_6         0xF146#define STATUS_ODOM_LIMIT_7         0xF147    // Description:    //      Odometer has exceeded a set limit    // Notes:    //      The odometer limit is provided by property PROP_ODOMETER_#_LIMIT// ----------------------------------------------------------------------------// Geofence/Geocorridor: 0xF200 to 0xF2FF#define STATUS_GEOFENCE_ARRIVE      0xF210    // Description:    //      Device arrived at geofence    // Notes:    //      - Client may wish to include FIELD_GEOFENCE_ID in the event packet.#define STATUS_GEOFENCE_DEPART      0xF230    // Description:    //      Device departed geofence    // Notes:    //      - Client may wish to include FIELD_GEOFENCE_ID in the event packet.#define STATUS_GEOFENCE_VIOLATION   0xF250    // Description:    //      Geofence violation    // Notes:    //      - Client may wish to include FIELD_GEOFENCE_ID in the event packet.#define STATUS_GEOFENCE_ACTIVE      0xF270    // Description:    //      Geofence now active    // Notes:    //      - Client may wish to include FIELD_GEOFENCE_ID in the event packet.#define STATUS_GEOFENCE_INACTIVE    0xF280    // Description:    //      Geofence now inactive    // Notes:    //      - Client may wish to include FIELD_GEOFENCE_ID in the event packet.#define STATUS_STATE_ENTER          0xF2A0    // Description:    //      Device has entered a state#define STATUS_STATE_EXIT           0xF2B0    // Description:    //      Device has exited a state// ----------------------------------------------------------------------------// Digital input/output (state change): 0xF400 to 0xF4FF#define STATUS_INPUT_STATE          0xF400    // Description:    //      Current input ON state (bitmask)    // Notes:    //      - Client should include FIELD_INPUT_STATE in the event packet,    //      otherwise this status code would have no meaning.#define STATUS_INPUT_ON             0xF402    // Description:    //      Input turned ON    // Notes:    //      - Client should include FIELD_INPUT_ID in the event packet,    //      otherwise this status code would have no meaning.    //      - This status code may be used to indicate that an arbitrary input    //      'thing' turned ON, and the 'thing' can be identified by the 'Input ID'.    //      This 'ID' can also represent the index of a digital input.#define STATUS_INPUT_OFF            0xF404    // Description:    //      Input turned OFF    // Notes:    //      - Client should include FIELD_INPUT_ID in the event packet,    //      otherwise this status code would have no meaning.    //      - This status code may be used to indicate that an arbitrary input    //      'thing' turned OFF, and the 'thing' can be identified by the 'Input ID'.    //      This 'ID' can also represent the index of a digital input.#define STATUS_OUTPUT_STATE         0xF406    // Description:    //      Current output ON state (bitmask)    // Notes:    //      - Client should include FIELD_OUTPUT_STATE in the event packet,    //      otherwise this status code would have no meaning.#define STATUS_OUTPUT_ON            0xF408    // Description:    //      Output turned ON    // Notes:    //      - Client should include FIELD_OUTPUT_ID in the event packet,    //      otherwise this status code would have no meaning.    //      - This status code may be used to indicate that an arbitrary output    //      'thing' turned ON, and the 'thing' can be identified by the 'Output ID'.    //      This 'ID' can also represent the index of a digital output.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -