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

📄 units.h

📁 SECS I, SECS II协议通讯源码
💻 H
字号:
#ifndef _UNITS_C
#define _UNITS_C
/*
 * Unit definitions
 */

// Used to specify which unit string to extract
#define UNI_SHORT            0
#define UNI_LONG             1
#define UNI_SEMI             2

// Extended unit flags
// Note that SECS-2 protocol converts time values of the format HH:MM
// or MM:SS to minutes or seconds before reporting them
#define UNI_TIME             0x4000
#define UNI_INTEGER          0x2000
#define UNI_MASK             0xFFF

// Used to signify a menu or data array by the save/ restore routines
// Given UN_ prefix in order to keep from possibility of conflicts
#define UN_MENU             0xfff
#define UN_ARRAY            0xffe

// Signifies that SEMI should use the units value associated with the
// given preset
#define UN_USEPRESET        0xf00

// Signify type values for non-NUMBER values
#define UN_FLOAT            0
#define UN_BOOL             1
#define UN_INT              2
#define UN_BINARY           3
#define UN_ASCII            4
#define UN_MODE             5
#define UN_BYTE             6

// Known units of measure
#define UN_NOUNIT           10
#define UN_HRMIN            11 | UNI_TIME
#define UN_MINSEC           12 | UNI_TIME
#define UN_TEMP             13
#define UN_DELTATEMP        14
#define UN_FEET             15
#define UN_FEETPERMINUTE    16
#define UN_VOLUME           17
#define UN_FLOW             18
#define UN_MASS             19
#define UN_PRESSURE         20
#define UN_CURRENT          21
#define UN_MS               22 | UNI_INTEGER
#define UN_HOURS            23 | UNI_INTEGER
#define UN_PERCENT          24
#define UN_INCHES           25
#define UN_INCHESPERSECOND  26
#define UN_SPECIFICGRAVITY  27
#define UN_LBPERHOUR        28
#define UN_RESISTANCE       29
#define UN_SECONDS          30

// Unit function prototypes
#include "units.p"

#endif // _UNITS_C

⌨️ 快捷键说明

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