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

📄 statuscodes.java

📁 Open DMT GPS server source code
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
// ----------------------------------------------------------------------------// Copyright 2006-2008, 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.//// ----------------------------------------------------------------------------// Change History://  2006/03/26  Martin D. Flynn//     -Initial release//  2006/03/31  Martin D. Flynn//     -Added new status codes://      STATUS_INITIALIZED, STATUS_WAYMARK//  2007/01/25  Martin D. Flynn//     -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//     -Changed "Code" descriptions to start their indexing at '1' (instead of '0') //      since this string value is used to display to the user on various reports.//  2007/03/11  Martin D. Flynn//     -'GetCodeDescription' defaults to hex value of status code (or status code//      name) if code is not found in the table.//  2007/12/04  Martin D. Flynn//     -Added new status codes: STATUS_EXCESS_BRAKING//  2008/05/12  Martin D. Flynn//     -Updated to Java 5.// ----------------------------------------------------------------------------package org.opendmtp.codes;import java.util.*;import org.opengts.util.*;public class StatusCodes{// ----------------------------------------------------------------------------// 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//      0xF9..  - OBC/J1708//      0xFD..  - Device status// ----------------------------------------------------------------------------// ----------------------------------------------------------------------------// No status code: 0x0000    public static final int STATUS_NONE                 = 0x0000;// ----------------------------------------------------------------------------// Generic codes: 0xF000 to 0xF0FF    public static final int 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).    public static final int STATUS_LOCATION             = 0xF020;    // Description:    //      General Status/Location information.  This status code indicates    //      no more than just the location of the device at a particular time.    // Notes:    //      - This contents of the payload must at least contain the current    //      timestamp, latitude, and longitude.    public static final int STATUS_WAYMARK              = 0xF030;    // Description:    //      General Status/Location information (event generated by manual user    //      intervention at the device. ie. By pressing a 'Waymark' button).    // Notes:    //      - This contents of the payload must at least contain the current    //      timestamp, latitude, and longitude.    public static final int STATUS_QUERY                = 0xF040;    // Description:    //      General Status/Location information (event generated by 'query'    //      from the server).    // Notes:    //      - This contents of the payload must at least contain the current    //      timestamp, latitude, and longitude.// ----------------------------------------------------------------------------// Motion codes: 0xF100 to 0xF1FF    public static final int STATUS_MOTION_START         = 0xF111;    // Description:    //      Device start of motion    // Notes:    //      The definition of motion-start is provided by property PROP_MOTION_START    public static final int STATUS_MOTION_IN_MOTION     = 0xF112;    // Description:    //      Device in-motion interval    // Notes:    //      The in-motion interval is provided by property PROP_MOTION_IN_MOTION    public static final int STATUS_MOTION_STOP          = 0xF113;    // Description:    //      Device stopped motion    // Notes:    //      The definition of motion-stop is provided by property PROP_MOTION_STOP    public static final int STATUS_MOTION_DORMANT       = 0xF114;    // Description:    //      Device dormant interval (ie. not moving)    // Notes:    //      The dormant interval is provided by property PROP_MOTION_DORMANT    public static final int STATUS_MOTION_EXCESS_SPEED  = 0xF11A;    // Description:    //      Device exceeded preset speed limit    // Notes:    //      The excess-speed threshold is provided by property PROP_MOTION_EXCESS_SPEED    public static final int 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.    public static final int STATUS_ODOM_0               = 0xF130;    public static final int STATUS_ODOM_1               = 0xF131;    public static final int STATUS_ODOM_2               = 0xF132;    public static final int STATUS_ODOM_3               = 0xF133;    public static final int STATUS_ODOM_4               = 0xF134;    public static final int STATUS_ODOM_5               = 0xF135;    public static final int STATUS_ODOM_6               = 0xF136;    public static final int STATUS_ODOM_7               = 0xF137;    // Description:    //      Odometer value    // Notes:    //      The odometer limit is provided by property PROP_ODOMETER_#_LIMIT    public static final int STATUS_ODOM_LIMIT_0         = 0xF140;    public static final int STATUS_ODOM_LIMIT_1         = 0xF141;    public static final int STATUS_ODOM_LIMIT_2         = 0xF142;    public static final int STATUS_ODOM_LIMIT_3         = 0xF143;    public static final int STATUS_ODOM_LIMIT_4         = 0xF144;    public static final int STATUS_ODOM_LIMIT_5         = 0xF145;    public static final int STATUS_ODOM_LIMIT_6         = 0xF146;    public static final int STATUS_ODOM_LIMIT_7         = 0xF147;    // Description:    //      Odometer has exceeded a set limit    // Notes:    //      The odometer limit is provided by property PROP_ODOMETER_#_LIMIT// ----------------------------------------------------------------------------// Geofence: 0xF200 to 0xF2FF    public static final int STATUS_GEOFENCE_ARRIVE      = 0xF210;    // Description:    //      Device arrived at geofence    // Notes:    //      - Client may wish to include FIELD_GEOFENCE_ID in the event packet.    public static final int STATUS_GEOFENCE_DEPART      = 0xF230;    // Description:    //      Device departed geofence    // Notes:    //      - Client may wish to include FIELD_GEOFENCE_ID in the event packet.    public static final int STATUS_GEOFENCE_VIOLATION   = 0xF250;    // Description:    //      Geofence violation    // Notes:    //      - Client may wish to include FIELD_GEOFENCE_ID in the event packet.    public static final int STATUS_GEOFENCE_ACTIVE      = 0xF270;    // Description:    //      Geofence now active    // Notes:    //      - Client may wish to include FIELD_GEOFENCE_ID in the event packet.    public static final int STATUS_GEOFENCE_INACTIVE    = 0xF280;    // Description:    //      Geofence now inactive    // Notes:    //      - Client may wish to include FIELD_GEOFENCE_ID in the event packet.// ----------------------------------------------------------------------------// Digital input/output (state change): 0xF400 to 0xF4FF    public static final int 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.    public static final int 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.    public static final int 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.    public static final int 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.    public static final int 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.    public static final int STATUS_OUTPUT_OFF           = 0xF40A;

⌨️ 快捷键说明

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