主控板核心板源程序 communication v3.3
parent
690e60236c
commit
612f9a56f2
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,348 @@
|
||||
/*
|
||||
js.h -- JavaScript header
|
||||
|
||||
Copyright (c) All Rights Reserved. See details at the end of the file.
|
||||
*/
|
||||
|
||||
#ifndef _h_JS
|
||||
#define _h_JS 1
|
||||
|
||||
/********************************* Includes ***********************************/
|
||||
|
||||
#include "goahead.h"
|
||||
|
||||
#if ME_GOAHEAD_JAVASCRIPT
|
||||
/********************************** Defines ***********************************/
|
||||
/*
|
||||
Constants
|
||||
*/
|
||||
#define JS_INC 110 /* Growth for tags/tokens */
|
||||
#define JS_SCRIPT_INC 1023 /* Growth for ej scripts */
|
||||
#define JS_OFFSET 1 /* hAlloc doesn't like 0 entries */
|
||||
#define JS_MAX_RECURSE 100 /* Sanity for maximum recursion */
|
||||
|
||||
/*
|
||||
Javascript Lexical analyser tokens
|
||||
*/
|
||||
#define TOK_ERR -1 /* Any error */
|
||||
#define TOK_LPAREN 1 /* ( */
|
||||
#define TOK_RPAREN 2 /* ) */
|
||||
#define TOK_IF 3 /* if */
|
||||
#define TOK_ELSE 4 /* else */
|
||||
#define TOK_LBRACE 5 /* { */
|
||||
#define TOK_RBRACE 6 /* } */
|
||||
#define TOK_LOGICAL 7 /* ||, &&, ! */
|
||||
#define TOK_EXPR 8 /* +, -, /, % */
|
||||
#define TOK_SEMI 9 /* ; */
|
||||
#define TOK_LITERAL 10 /* literal string */
|
||||
#define TOK_FUNCTION 11 /* function name */
|
||||
#define TOK_NEWLINE 12 /* newline white space */
|
||||
#define TOK_ID 13 /* function name */
|
||||
#define TOK_EOF 14 /* End of script */
|
||||
#define TOK_COMMA 15 /* Comma */
|
||||
#define TOK_VAR 16 /* var */
|
||||
#define TOK_ASSIGNMENT 17 /* = */
|
||||
#define TOK_FOR 18 /* for */
|
||||
#define TOK_INC_DEC 19 /* ++, -- */
|
||||
#define TOK_RETURN 20 /* return */
|
||||
|
||||
/*
|
||||
Expression operators
|
||||
*/
|
||||
#define EXPR_LESS 1 /* < */
|
||||
#define EXPR_LESSEQ 2 /* <= */
|
||||
#define EXPR_GREATER 3 /* > */
|
||||
#define EXPR_GREATEREQ 4 /* >= */
|
||||
#define EXPR_EQ 5 /* == */
|
||||
#define EXPR_NOTEQ 6 /* != */
|
||||
#define EXPR_PLUS 7 /* + */
|
||||
#define EXPR_MINUS 8 /* - */
|
||||
#define EXPR_DIV 9 /* / */
|
||||
#define EXPR_MOD 10 /* % */
|
||||
#define EXPR_LSHIFT 11 /* << */
|
||||
#define EXPR_RSHIFT 12 /* >> */
|
||||
#define EXPR_MUL 13 /* * */
|
||||
#define EXPR_ASSIGNMENT 14 /* = */
|
||||
#define EXPR_INC 15 /* ++ */
|
||||
#define EXPR_DEC 16 /* -- */
|
||||
#define EXPR_BOOL_COMP 17 /* ! */
|
||||
/*
|
||||
Conditional operators
|
||||
*/
|
||||
#define COND_AND 1 /* && */
|
||||
#define COND_OR 2 /* || */
|
||||
#define COND_NOT 3 /* ! */
|
||||
|
||||
/*
|
||||
States
|
||||
*/
|
||||
#define STATE_ERR -1 /* Error state */
|
||||
#define STATE_EOF 1 /* End of file */
|
||||
#define STATE_COND 2 /* Parsing a "(conditional)" stmt */
|
||||
#define STATE_COND_DONE 3
|
||||
#define STATE_RELEXP 4 /* Parsing a relational expr */
|
||||
#define STATE_RELEXP_DONE 5
|
||||
#define STATE_EXPR 6 /* Parsing an expression */
|
||||
#define STATE_EXPR_DONE 7
|
||||
#define STATE_STMT 8 /* Parsing General statement */
|
||||
#define STATE_STMT_DONE 9
|
||||
#define STATE_STMT_BLOCK_DONE 10 /* End of block "}" */
|
||||
#define STATE_ARG_LIST 11 /* Function arg list */
|
||||
#define STATE_ARG_LIST_DONE 12
|
||||
#define STATE_DEC_LIST 16 /* Declaration list */
|
||||
#define STATE_DEC_LIST_DONE 17
|
||||
#define STATE_DEC 18
|
||||
#define STATE_DEC_DONE 19
|
||||
#define STATE_RET 20 /* Return statement */
|
||||
|
||||
#define STATE_BEGIN STATE_STMT
|
||||
|
||||
/*
|
||||
Flags. Used in Js and as parameter to parse()
|
||||
*/
|
||||
#define FLAGS_EXE 0x1 /* Execute statements */
|
||||
#define FLAGS_VARIABLES 0x2 /* Allocated variables store */
|
||||
#define FLAGS_FUNCTIONS 0x4 /* Allocated function store */
|
||||
|
||||
/*
|
||||
Function call structure
|
||||
*/
|
||||
typedef struct JsFun {
|
||||
char *fname; /* Function name */
|
||||
char **args; /* Args for function (halloc) */
|
||||
int nArgs; /* Number of args */
|
||||
} JsFun;
|
||||
|
||||
/*
|
||||
Evaluation block structure
|
||||
*/
|
||||
typedef struct JsInput {
|
||||
WebsBuf tokbuf; /* Current token */
|
||||
WebsBuf script; /* Input script for parsing */
|
||||
char *putBackToken; /* Putback token string */
|
||||
int putBackTokenId; /* Putback token ID */
|
||||
char *line; /* Current line */
|
||||
int lineLength; /* Current line length */
|
||||
int lineNumber; /* Parse line number */
|
||||
int lineColumn; /* Column in line */
|
||||
} JsInput;
|
||||
|
||||
|
||||
/**
|
||||
Javascript engine structure
|
||||
@defgroup Js Js
|
||||
*/
|
||||
typedef struct Js {
|
||||
JsInput *input; /* Input evaluation block */
|
||||
WebsHash functions; /* Symbol table for functions */
|
||||
WebsHash *variables; /* hAlloc list of variables */
|
||||
int variableMax; /* Number of entries */
|
||||
JsFun *func; /* Current function */
|
||||
char *result; /* Current expression result */
|
||||
char *error; /* Error message */
|
||||
char *token; /* Pointer to token string */
|
||||
int tid; /* Current token id */
|
||||
int jid; /* Halloc handle */
|
||||
int flags; /* Flags */
|
||||
void *userHandle; /* User defined handle */
|
||||
} Js;
|
||||
|
||||
|
||||
/**
|
||||
Javascript function procedure
|
||||
@ingroup Js
|
||||
*/
|
||||
typedef int (*JsProc)(int jid, void *handle, int argc, char **argv);
|
||||
|
||||
/******************************** Prototypes **********************************/
|
||||
/**
|
||||
Utility routine to parse function arguments
|
||||
@param argc Count of arguments in argv
|
||||
@param argv Array of arguments
|
||||
@param fmt Printf style format string
|
||||
@return Count of the arguments parsed
|
||||
@ingroup Js
|
||||
*/
|
||||
PUBLIC int jsArgs(int argc, char **argv, char *fmt, ...);
|
||||
|
||||
/**
|
||||
Close a javascript engine
|
||||
@param jid Javascript ID allocated via jsOpenEngine
|
||||
@ingroup Js
|
||||
*/
|
||||
PUBLIC void jsCloseEngine(int jid);
|
||||
|
||||
/**
|
||||
Emit a parse error
|
||||
@param js Javascript engine object
|
||||
@param fmt Error message format string
|
||||
@ingroup Js
|
||||
*/
|
||||
PUBLIC void jsError(Js *js, char *fmt, ...);
|
||||
|
||||
/**
|
||||
Parse and evaluate a script. Return the last function return value.
|
||||
@param jid Javascript ID allocated via jsOpenEngine
|
||||
@param script Script to evaluate
|
||||
@param emsg Pointer to a string to receive any error message
|
||||
@param str String value to use as the result. Set to null for errors.
|
||||
@ingroup Js
|
||||
*/
|
||||
PUBLIC char *jsEval(int jid, char *script, char **emsg);
|
||||
|
||||
/**
|
||||
Get the function result value
|
||||
@param jid Javascript ID allocated via jsOpenEngine
|
||||
@return Function return value string. Caller must not free.
|
||||
@ingroup Js
|
||||
*/
|
||||
PUBLIC char *jsGetResult(int jid);
|
||||
|
||||
/**
|
||||
Get a variable value
|
||||
@param jid Javascript ID allocated via jsOpenEngine
|
||||
@param var Variable name
|
||||
@param value Returned value.
|
||||
@return If successful, a positive variable index, otherwise -1. This will be zero for global variables
|
||||
and > 0 for local variables.
|
||||
@ingroup Js
|
||||
*/
|
||||
PUBLIC int jsGetVar(int jid, char *var, char **value);
|
||||
|
||||
/**
|
||||
Open a new javascript engine
|
||||
@param variables Hash table of variables
|
||||
@param functions Hash table of functions
|
||||
@ingroup Js
|
||||
*/
|
||||
PUBLIC int jsOpenEngine(WebsHash variables, WebsHash functions);
|
||||
|
||||
/**
|
||||
Set a local variable
|
||||
@param jid Javascript ID allocated via jsOpenEngine
|
||||
@param var Variable name
|
||||
@param value Value to use
|
||||
@ingroup Js
|
||||
*/
|
||||
PUBLIC void jsSetLocalVar(int jid, char *var, char *value);
|
||||
|
||||
/**
|
||||
Set a global variable
|
||||
@param jid Javascript ID allocated via jsOpenEngine
|
||||
@param var Variable name
|
||||
@param value value to use
|
||||
@ingroup Js
|
||||
*/
|
||||
PUBLIC void jsSetGlobalVar(int jid, char *var, char *value);
|
||||
|
||||
/**
|
||||
Set the function return result
|
||||
@param jid Javascript ID allocated via jsOpenEngine
|
||||
@param str String value to use as the result
|
||||
@ingroup Js
|
||||
*/
|
||||
PUBLIC void jsSetResult(int jid, char *str);
|
||||
|
||||
/**
|
||||
Set a variable value in the top most variable frame
|
||||
@param jid Javascript ID allocated via jsOpenEngine
|
||||
@param var Variable name
|
||||
@param value Value to set
|
||||
@ingroup Js
|
||||
*/
|
||||
PUBLIC void jsSetVar(int jid, char *var, char *value);
|
||||
|
||||
/**
|
||||
Set a global function
|
||||
@param jid Javascript ID allocated via jsOpenEngine
|
||||
@param name Javascript function name
|
||||
@param fn C function providing the implementation.
|
||||
@ingroup Js
|
||||
*/
|
||||
PUBLIC int jsSetGlobalFunction(int jid, char *name, JsProc fn);
|
||||
|
||||
/*
|
||||
Internal API
|
||||
*/
|
||||
PUBLIC int jsCloseBlock(int jid, int vid);
|
||||
PUBLIC char *jsEvalBlock(int jid, char *script, char **emsg);
|
||||
PUBLIC WebsHash jsGetFunctionTable(int jid);
|
||||
PUBLIC void *jsGetGlobalFunction(int jid, char *name);
|
||||
PUBLIC int jsGetLineNumber(int jid);
|
||||
PUBLIC void *jsGetUserHandle(int jid);
|
||||
PUBLIC WebsHash jsGetVariableTable(int jid);
|
||||
PUBLIC int jsLexOpen(Js *ep);
|
||||
PUBLIC void jsLexClose(Js *ep);
|
||||
PUBLIC int jsLexOpenScript(Js *ep, char *script);
|
||||
PUBLIC void jsLexCloseScript(Js *ep);
|
||||
PUBLIC void jsLexSaveInputState(Js *ep, JsInput *state);
|
||||
PUBLIC void jsLexFreeInputState(Js *ep, JsInput *state);
|
||||
PUBLIC void jsLexRestoreInputState(Js *ep, JsInput *state);
|
||||
PUBLIC int jsLexGetToken(Js *ep, int state);
|
||||
PUBLIC void jsLexPutbackToken(Js *ep, int tid, char *string);
|
||||
PUBLIC int jsOpenBlock(int jid);
|
||||
PUBLIC int jsRemoveGlobalFunction(int jid, char *name);
|
||||
PUBLIC int jsSetGlobalFunctionDirect(WebsHash functions, char *name, JsProc fn);
|
||||
PUBLIC void jsSetUserHandle(int jid, void *handle);
|
||||
|
||||
#if ME_GOAHEAD_LEGACY
|
||||
typedef Js ej_t;
|
||||
typedef JsInput jsinput_t;
|
||||
typedef JsFun jsfunc_t;
|
||||
|
||||
#define ejOpenBlock jsOpenBlock
|
||||
#define ejCloseBlock jsCloseBlock
|
||||
#define ejEvalBlock jsEvalBlock
|
||||
#define ejRemoveGlobalFunction jsRemoveGlobalFunction
|
||||
#define ejGetGlobalFunction jsGetGlobalFunction
|
||||
#define ejSetGlobalFunctionDirect jsSetGlobalFunctionDirect
|
||||
#define ejError jsError
|
||||
#define ejSetUserHandle jsSetUserHandle
|
||||
#define ejGetUserHandle jsGetUserHandle
|
||||
#define ejGetLineNumber jsGetLineNumber
|
||||
#define ejGetResult jsGetResult
|
||||
#define ejSetLocalVar jsSetLocalVar
|
||||
#define ejSetGlobalVar jsSetGlobalVar
|
||||
#define ejLexOpen jsLexOpen
|
||||
#define ejLexClose jsLexClose
|
||||
#define ejLexOpenScript jsLexOpenScript
|
||||
#define ejLexCloseScript jsLexCloseScript
|
||||
#define ejLexSaveInputState jsLexSaveInputState
|
||||
#define ejLexFreeInputState jsLexFreeInputState
|
||||
#define ejLexRestoreInputState jsLexRestoreInputState
|
||||
#define ejLexGetToken jsLexGetToken
|
||||
#define ejLexPutbackToken jsLexPutbackToken
|
||||
#define ejGetVariableTable jsGetVariableTable
|
||||
#define ejGetFunctionTable jsGetFunctionTable
|
||||
#define ejArgs jsArgs
|
||||
#define ejSetResult jsSetResult
|
||||
#define ejOpenEngine jsOpenEngine
|
||||
#define ejCloseEngine jsCloseEngine
|
||||
#define ejSetGlobalFunction jsSetGlobalFunction
|
||||
#define ejSetVar jsSetVar
|
||||
#define ejGetVar jsGetVar
|
||||
#define ejEval jsEval
|
||||
#endif
|
||||
|
||||
#endif /* ME_GOAHEAD_JAVASCRIPT */
|
||||
#endif /* _h_JS */
|
||||
|
||||
/*
|
||||
@copy default
|
||||
|
||||
Copyright (c) Embedthis Software. All Rights Reserved.
|
||||
|
||||
This software is distributed under commercial and open source licenses.
|
||||
You may use the Embedthis GoAhead open source license or you may acquire
|
||||
a commercial license from Embedthis Software. You agree to be fully bound
|
||||
by the terms of either license. Consult the LICENSE.md distributed with
|
||||
this software for full details and other copyrights.
|
||||
|
||||
Local variables:
|
||||
tab-width: 4
|
||||
c-basic-offset: 4
|
||||
End:
|
||||
vim: sw=4 ts=4 expandtab
|
||||
|
||||
@end
|
||||
*/
|
@ -0,0 +1,390 @@
|
||||
/*
|
||||
me.h -- MakeMe Configure Header for linux-x86-static
|
||||
|
||||
This header is created by Me during configuration. To change settings, re-run
|
||||
configure or define variables in your Makefile to override these default values.
|
||||
*/
|
||||
|
||||
/* Settings */
|
||||
#ifndef ME_AUTHOR
|
||||
#define ME_AUTHOR "Embedthis Software"
|
||||
#endif
|
||||
#ifndef ME_CERTS_BITS
|
||||
#define ME_CERTS_BITS 2048
|
||||
#endif
|
||||
#ifndef ME_CERTS_DAYS
|
||||
#define ME_CERTS_DAYS 3650
|
||||
#endif
|
||||
#ifndef ME_CERTS_GENDH
|
||||
#define ME_CERTS_GENDH 1
|
||||
#endif
|
||||
#ifndef ME_COMPANY
|
||||
#define ME_COMPANY "embedthis"
|
||||
#endif
|
||||
#ifndef ME_COMPATIBLE
|
||||
#define ME_COMPATIBLE "3.4"
|
||||
#endif
|
||||
#ifndef ME_COMPILER_HAS_ATOMIC
|
||||
#define ME_COMPILER_HAS_ATOMIC 0
|
||||
#endif
|
||||
#ifndef ME_COMPILER_HAS_ATOMIC64
|
||||
#define ME_COMPILER_HAS_ATOMIC64 0
|
||||
#endif
|
||||
#ifndef ME_COMPILER_HAS_DOUBLE_BRACES
|
||||
#define ME_COMPILER_HAS_DOUBLE_BRACES 0
|
||||
#endif
|
||||
#ifndef ME_COMPILER_HAS_DYN_LOAD
|
||||
#define ME_COMPILER_HAS_DYN_LOAD 1
|
||||
#endif
|
||||
#ifndef ME_COMPILER_HAS_LIB_EDIT
|
||||
#define ME_COMPILER_HAS_LIB_EDIT 0
|
||||
#endif
|
||||
#ifndef ME_COMPILER_HAS_LIB_RT
|
||||
#define ME_COMPILER_HAS_LIB_RT 1
|
||||
#endif
|
||||
#ifndef ME_COMPILER_HAS_MMU
|
||||
#define ME_COMPILER_HAS_MMU 1
|
||||
#endif
|
||||
#ifndef ME_COMPILER_HAS_MTUNE
|
||||
#define ME_COMPILER_HAS_MTUNE 1
|
||||
#endif
|
||||
#ifndef ME_COMPILER_HAS_PAM
|
||||
#define ME_COMPILER_HAS_PAM 0
|
||||
#endif
|
||||
#ifndef ME_COMPILER_HAS_STACK_PROTECTOR
|
||||
#define ME_COMPILER_HAS_STACK_PROTECTOR 1
|
||||
#endif
|
||||
#ifndef ME_COMPILER_HAS_SYNC
|
||||
#define ME_COMPILER_HAS_SYNC 1
|
||||
#endif
|
||||
#ifndef ME_COMPILER_HAS_SYNC64
|
||||
#define ME_COMPILER_HAS_SYNC64 1
|
||||
#endif
|
||||
#ifndef ME_COMPILER_HAS_SYNC_CAS
|
||||
#define ME_COMPILER_HAS_SYNC_CAS 0
|
||||
#endif
|
||||
#ifndef ME_COMPILER_HAS_UNNAMED_UNIONS
|
||||
#define ME_COMPILER_HAS_UNNAMED_UNIONS 1
|
||||
#endif
|
||||
#ifndef ME_COMPILER_WARN64TO32
|
||||
#define ME_COMPILER_WARN64TO32 0
|
||||
#endif
|
||||
#ifndef ME_COMPILER_WARN_UNUSED
|
||||
#define ME_COMPILER_WARN_UNUSED 1
|
||||
#endif
|
||||
#ifndef ME_DEBUG
|
||||
#define ME_DEBUG 1
|
||||
#endif
|
||||
#ifndef ME_DEPTH
|
||||
#define ME_DEPTH 1
|
||||
#endif
|
||||
#ifndef ME_DESCRIPTION
|
||||
#define ME_DESCRIPTION "Embedthis GoAhead Embedded Web Server"
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_ACCESS_LOG
|
||||
#define ME_GOAHEAD_ACCESS_LOG 0
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_AUTH
|
||||
#define ME_GOAHEAD_AUTH 1
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_AUTH_STORE
|
||||
#define ME_GOAHEAD_AUTH_STORE "file"
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_AUTO_LOGIN
|
||||
#define ME_GOAHEAD_AUTO_LOGIN 0
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_CGI
|
||||
#define ME_GOAHEAD_CGI 1
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_CGI_BIN
|
||||
#define ME_GOAHEAD_CGI_BIN "cgi-bin"
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_CLIENT_CACHE
|
||||
#define ME_GOAHEAD_CLIENT_CACHE "css,gif,ico,jpg,js,png"
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_CLIENT_CACHE_LIFESPAN
|
||||
#define ME_GOAHEAD_CLIENT_CACHE_LIFESPAN 86400
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_DIGEST
|
||||
#define ME_GOAHEAD_DIGEST 1
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_DOCUMENTS
|
||||
#define ME_GOAHEAD_DOCUMENTS "web"
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_JAVASCRIPT
|
||||
#define ME_GOAHEAD_JAVASCRIPT 1
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_LEGACY
|
||||
#define ME_GOAHEAD_LEGACY 0
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_LIMIT_BUFFER
|
||||
#define ME_GOAHEAD_LIMIT_BUFFER 1024
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_LIMIT_FILENAME
|
||||
#define ME_GOAHEAD_LIMIT_FILENAME 256
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_LIMIT_FILES
|
||||
#define ME_GOAHEAD_LIMIT_FILES 0
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_LIMIT_HEADER
|
||||
#define ME_GOAHEAD_LIMIT_HEADER 2048
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_LIMIT_HEADERS
|
||||
#define ME_GOAHEAD_LIMIT_HEADERS 4096
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_LIMIT_NUM_HEADERS
|
||||
#define ME_GOAHEAD_LIMIT_NUM_HEADERS 64
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_LIMIT_PARSE_TIMEOUT
|
||||
#define ME_GOAHEAD_LIMIT_PARSE_TIMEOUT 5
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_LIMIT_PASSWORD
|
||||
#define ME_GOAHEAD_LIMIT_PASSWORD 32
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_LIMIT_POST
|
||||
#define ME_GOAHEAD_LIMIT_POST 16384
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_LIMIT_PUT
|
||||
#define ME_GOAHEAD_LIMIT_PUT 204800000
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_LIMIT_SESSION_COUNT
|
||||
#define ME_GOAHEAD_LIMIT_SESSION_COUNT 512
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_LIMIT_SESSION_LIFE
|
||||
#define ME_GOAHEAD_LIMIT_SESSION_LIFE 1800
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_LIMIT_STRING
|
||||
#define ME_GOAHEAD_LIMIT_STRING 256
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_LIMIT_TIMEOUT
|
||||
#define ME_GOAHEAD_LIMIT_TIMEOUT 60
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_LIMIT_UPLOAD
|
||||
#define ME_GOAHEAD_LIMIT_UPLOAD 204800000
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_LIMIT_URI
|
||||
#define ME_GOAHEAD_LIMIT_URI 2048
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_LISTEN
|
||||
#define ME_GOAHEAD_LISTEN "http://*:80,https://*:443"
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_LOGFILE
|
||||
#define ME_GOAHEAD_LOGFILE "stderr:0"
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_LOGGING
|
||||
#define ME_GOAHEAD_LOGGING 1
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_PUT_DIR
|
||||
#define ME_GOAHEAD_PUT_DIR "."
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_REALM
|
||||
#define ME_GOAHEAD_REALM "example.com"
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_REPLACE_MALLOC
|
||||
#define ME_GOAHEAD_REPLACE_MALLOC 0
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_SSL_AUTHORITY
|
||||
#define ME_GOAHEAD_SSL_AUTHORITY ""
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_SSL_CACHE
|
||||
#define ME_GOAHEAD_SSL_CACHE 512
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_SSL_CERTIFICATE
|
||||
#define ME_GOAHEAD_SSL_CERTIFICATE "self.crt"
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_SSL_CIPHERS
|
||||
#define ME_GOAHEAD_SSL_CIPHERS ""
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_SSL_KEY
|
||||
#define ME_GOAHEAD_SSL_KEY "self.key"
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_SSL_LOG_LEVEL
|
||||
#define ME_GOAHEAD_SSL_LOG_LEVEL 5
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_SSL_RENEGOTIATE
|
||||
#define ME_GOAHEAD_SSL_RENEGOTIATE 1
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_SSL_REVOKE
|
||||
#define ME_GOAHEAD_SSL_REVOKE ""
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_SSL_TICKET
|
||||
#define ME_GOAHEAD_SSL_TICKET 1
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_SSL_TIMEOUT
|
||||
#define ME_GOAHEAD_SSL_TIMEOUT 86400
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_SSL_VERIFY_ISSUER
|
||||
#define ME_GOAHEAD_SSL_VERIFY_ISSUER 0
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_SSL_VERIFY_PEER
|
||||
#define ME_GOAHEAD_SSL_VERIFY_PEER 0
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_STEALTH
|
||||
#define ME_GOAHEAD_STEALTH 1
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_TRACING
|
||||
#define ME_GOAHEAD_TRACING 1
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_UPLOAD
|
||||
#define ME_GOAHEAD_UPLOAD 1
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_UPLOAD_DIR
|
||||
#define ME_GOAHEAD_UPLOAD_DIR "/COMTRADE"
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_XFRAME_HEADER
|
||||
#define ME_GOAHEAD_XFRAME_HEADER "SAMEORIGIN"
|
||||
#endif
|
||||
#ifndef ME_INTEGRATE
|
||||
#define ME_INTEGRATE 1
|
||||
#endif
|
||||
#ifndef ME_MANIFEST
|
||||
#define ME_MANIFEST "installs/manifest.me"
|
||||
#endif
|
||||
#ifndef ME_MBEDTLS_COMPACT
|
||||
#define ME_MBEDTLS_COMPACT 1
|
||||
#endif
|
||||
#ifndef ME_NAME
|
||||
#define ME_NAME "goahead"
|
||||
#endif
|
||||
#ifndef ME_PREFIXES
|
||||
#define ME_PREFIXES "install-prefixes"
|
||||
#endif
|
||||
#ifndef ME_STATIC
|
||||
#define ME_STATIC 1
|
||||
#endif
|
||||
#ifndef ME_TITLE
|
||||
#define ME_TITLE "Embedthis GoAhead"
|
||||
#endif
|
||||
#ifndef ME_VERSION
|
||||
#define ME_VERSION "3.4.9"
|
||||
#endif
|
||||
|
||||
/* Prefixes */
|
||||
#ifndef ME_ROOT_PREFIX
|
||||
#define ME_ROOT_PREFIX "/"
|
||||
#endif
|
||||
#ifndef ME_BASE_PREFIX
|
||||
#define ME_BASE_PREFIX "/usr/local"
|
||||
#endif
|
||||
#ifndef ME_DATA_PREFIX
|
||||
#define ME_DATA_PREFIX "/"
|
||||
#endif
|
||||
#ifndef ME_STATE_PREFIX
|
||||
#define ME_STATE_PREFIX "/var"
|
||||
#endif
|
||||
#ifndef ME_APP_PREFIX
|
||||
#define ME_APP_PREFIX "/usr/local/lib/goahead"
|
||||
#endif
|
||||
#ifndef ME_VAPP_PREFIX
|
||||
#define ME_VAPP_PREFIX "/usr/local/lib/goahead/3.4.9"
|
||||
#endif
|
||||
#ifndef ME_BIN_PREFIX
|
||||
#define ME_BIN_PREFIX "/usr/local/bin"
|
||||
#endif
|
||||
#ifndef ME_INC_PREFIX
|
||||
#define ME_INC_PREFIX "/usr/local/include"
|
||||
#endif
|
||||
#ifndef ME_LIB_PREFIX
|
||||
#define ME_LIB_PREFIX "/usr/local/lib"
|
||||
#endif
|
||||
#ifndef ME_MAN_PREFIX
|
||||
#define ME_MAN_PREFIX "/usr/local/share/man"
|
||||
#endif
|
||||
#ifndef ME_SBIN_PREFIX
|
||||
#define ME_SBIN_PREFIX "/usr/local/sbin"
|
||||
#endif
|
||||
#ifndef ME_ETC_PREFIX
|
||||
#define ME_ETC_PREFIX "/etc/goahead"
|
||||
#endif
|
||||
#ifndef ME_WEB_PREFIX
|
||||
#define ME_WEB_PREFIX "/var/www/goahead"
|
||||
#endif
|
||||
#ifndef ME_LOG_PREFIX
|
||||
#define ME_LOG_PREFIX "/var/log/goahead"
|
||||
#endif
|
||||
#ifndef ME_SPOOL_PREFIX
|
||||
#define ME_SPOOL_PREFIX "/var/spool/goahead"
|
||||
#endif
|
||||
#ifndef ME_CACHE_PREFIX
|
||||
#define ME_CACHE_PREFIX "/var/spool/goahead/cache"
|
||||
#endif
|
||||
#ifndef ME_SRC_PREFIX
|
||||
#define ME_SRC_PREFIX "goahead-3.4.9"
|
||||
#endif
|
||||
|
||||
/* Suffixes */
|
||||
#ifndef ME_EXE
|
||||
#define ME_EXE ""
|
||||
#endif
|
||||
#ifndef ME_SHLIB
|
||||
#define ME_SHLIB ".so"
|
||||
#endif
|
||||
#ifndef ME_SHOBJ
|
||||
#define ME_SHOBJ ".so"
|
||||
#endif
|
||||
#ifndef ME_LIB
|
||||
#define ME_LIB ".a"
|
||||
#endif
|
||||
#ifndef ME_OBJ
|
||||
#define ME_OBJ ".o"
|
||||
#endif
|
||||
|
||||
/* Profile */
|
||||
#ifndef ME_CONFIG_CMD
|
||||
#define ME_CONFIG_CMD "me -d -q -platform linux-x86-static -static -configure . -with openssl -gen make"
|
||||
#endif
|
||||
#ifndef ME_GOAHEAD_PRODUCT
|
||||
#define ME_GOAHEAD_PRODUCT 1
|
||||
#endif
|
||||
#ifndef ME_PROFILE
|
||||
#define ME_PROFILE "static"
|
||||
#endif
|
||||
#ifndef ME_TUNE_SIZE
|
||||
#define ME_TUNE_SIZE 1
|
||||
#endif
|
||||
|
||||
/* Miscellaneous */
|
||||
#ifndef ME_MAJOR_VERSION
|
||||
#define ME_MAJOR_VERSION 3
|
||||
#endif
|
||||
#ifndef ME_MINOR_VERSION
|
||||
#define ME_MINOR_VERSION 4
|
||||
#endif
|
||||
#ifndef ME_PATCH_VERSION
|
||||
#define ME_PATCH_VERSION 9
|
||||
#endif
|
||||
#ifndef ME_VNUM
|
||||
#define ME_VNUM 300040009
|
||||
#endif
|
||||
|
||||
/* Components */
|
||||
#ifndef ME_COM_CC
|
||||
#define ME_COM_CC 1
|
||||
#endif
|
||||
#ifndef ME_COM_LIB
|
||||
#define ME_COM_LIB 1
|
||||
#endif
|
||||
#ifndef ME_COM_MATRIXSSL
|
||||
#define ME_COM_MATRIXSSL 0
|
||||
#endif
|
||||
#ifndef ME_COM_MBEDTLS
|
||||
#define ME_COM_MBEDTLS 0
|
||||
#endif
|
||||
#ifndef ME_COM_NANOSSL
|
||||
#define ME_COM_NANOSSL 0
|
||||
#endif
|
||||
#ifndef ME_COM_OPENSSL
|
||||
#define ME_COM_OPENSSL 0
|
||||
#endif
|
||||
#ifndef ME_COM_OSDEP
|
||||
#define ME_COM_OSDEP 1
|
||||
#endif
|
||||
#ifndef ME_COM_SSL
|
||||
#define ME_COM_SSL 0
|
||||
#endif
|
||||
#ifndef ME_COM_VXWORKS
|
||||
#define ME_COM_VXWORKS 0
|
||||
#endif
|
||||
#ifndef ME_COM_WINSDK
|
||||
#define ME_COM_WINSDK 1
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,881 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SCL xmlns="http://www.iec.ch/61850/2003/SCL" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ext="http://www.test.com.cn">
|
||||
<Header id="xy_JF_SCL" nameStructure="IEDName">
|
||||
<History>
|
||||
<Hitem version="1.00" revision="1.0" when="2013/12/04 10:00:00" who="" why="first release version"></Hitem>
|
||||
</History>
|
||||
</Header>
|
||||
<Communication>
|
||||
<SubNetwork name="W01" type="8-MMS">
|
||||
<ConnectedAP iedName="TIED10" apName="S1">
|
||||
<Address>
|
||||
<P type="IP">172.16.3.10</P>
|
||||
<P type="IP-SUBNET">255.255.0.0</P>
|
||||
<P type="IP-GATEWAY">172.16.3.1</P>
|
||||
<P type="OSI-PSEL">00 00 00 01</P>
|
||||
<P type="OSI-SSEL">00 01</P>
|
||||
<P type="OSI-TSEL">00 01</P>
|
||||
</Address>
|
||||
</ConnectedAP>
|
||||
</SubNetwork>
|
||||
</Communication>
|
||||
<IED name="TIED10" desc="油色谱在线监测IED" type="XY-IED-220V100" manufacturer="上海欣影电力科技股份有限公司" configVersion="V1.0">
|
||||
<Services>
|
||||
<DynAssociation/>
|
||||
<GetDirectory/>
|
||||
<GetDataObjectDefinition/>
|
||||
<GetDataSetValue/>
|
||||
<DataSetDirectory/>
|
||||
<ReadWrite/>
|
||||
<FileHandling/>
|
||||
<ConfDataSet max="16" maxAttributes="200"/>
|
||||
<ConfReportControl max="16"/>
|
||||
<ReportSettings bufTime="Dyn" cbName="Conf" rptID="Dyn" datSet="Conf" intgPd="Dyn" optFields="Conf"/>
|
||||
<ConfLogControl max="1"/>
|
||||
<ConfLNs fixLnInst="true"/>
|
||||
<GetCBValues/>
|
||||
<GOOSE max="2"/>
|
||||
<GSESettings appID="Conf" cbName="Conf" datSet="Conf"/>
|
||||
</Services>
|
||||
<AccessPoint name="S1">
|
||||
<Server>
|
||||
<Authentication/>
|
||||
<LDevice desc="油色谱在线监测设备" inst="MONT">
|
||||
<LN0 desc="description" lnType="xyLN0" lnClass="LLN0" inst="">
|
||||
<DataSet name="dsMeasure" desc="遥测数据集">
|
||||
<FCDA ldInst="MONT" lnClass="SIML" lnInst="01" doName="Tmp" fc="MX"/>
|
||||
<FCDA ldInst="MONT" lnClass="SIML" lnInst="01" doName="H2" fc="MX"/>
|
||||
<FCDA ldInst="MONT" lnClass="SIML" lnInst="01" doName="CO" fc="MX"/>
|
||||
<FCDA ldInst="MONT" lnClass="SIML" lnInst="01" doName="CH4" fc="MX"/>
|
||||
<FCDA ldInst="MONT" lnClass="SIML" lnInst="01" doName="C2H4" fc="MX"/>
|
||||
<FCDA ldInst="MONT" lnClass="SIML" lnInst="01" doName="C2H6" fc="MX"/>
|
||||
<FCDA ldInst="MONT" lnClass="SIML" lnInst="01" doName="C2H2" fc="MX"/>
|
||||
<FCDA ldInst="MONT" lnClass="SIML" lnInst="01" doName="TotHyd" fc="MX"/>
|
||||
<FCDA ldInst="MONT" lnClass="SIML" lnInst="01" doName="SmpTm" fc="MX"/>
|
||||
<FCDA ldInst="MONT" lnClass="SIML" lnInst="01" doName="CO2" fc="MX"/>
|
||||
<FCDA ldInst="MONT" lnClass="SIML" lnInst="01" doName="MicrWat" fc="MX"/>
|
||||
<FCDA ldInst="MONT" lnClass="SIML" lnInst="01" doName="GasPres" fc="MX"/>
|
||||
<FCDA ldInst="MONT" lnClass="SIML" lnInst="01" doName="GasBot" fc="MX"/>
|
||||
</DataSet>
|
||||
<DataSet name="dsState" desc="遥信数据集">
|
||||
<FCDA ldInst="MONT" lnClass="SIML" lnInst="01" doName="MoDevConf" fc="ST"/>
|
||||
<FCDA ldInst="MONT" lnClass="SIML" lnInst="01" doName="SupDevRun" fc="ST"/>
|
||||
<FCDA ldInst="MONT" lnClass="SIML" lnInst="01" doName="GasUnPresAlm" fc="ST"/>
|
||||
<FCDA ldInst="MONT" lnClass="SIML" lnInst="01" doName="GasLowPresAlm" fc="ST"/>
|
||||
<FCDA ldInst="MONT" lnClass="SIML" lnInst="01" doName="ActCyGasSta" fc="ST"/>
|
||||
</DataSet>
|
||||
<ReportControl name="urcbMeasure" desc="遥测量数据报告控制块" rptID="urcbMeasure" datSet="dsMeasure" confRev="1" buffered="false" intgPd="60000">
|
||||
<TrgOps dchg="true" qchg="true" dupd="false" period="true"/>
|
||||
<OptFields seqNum="true" dataRef="true" reasonCode="true" dataSet="true" entryID="true" timeStamp="true" configRef="true"/>
|
||||
<RptEnabled max="8"/>
|
||||
</ReportControl>
|
||||
<ReportControl name="brcbState" desc="遥信量数据报告控制块" rptID="brcbState" datSet="dsState" confRev="1" buffered="true" bufTime="4000" intgPd="60000">
|
||||
<TrgOps dchg="true" qchg="true" dupd="false" period="true"/>
|
||||
<OptFields seqNum="true" dataRef="true" reasonCode="true" dataSet="true" entryID="true" timeStamp="true" configRef="true"/>
|
||||
<RptEnabled max="8"/>
|
||||
</ReportControl>
|
||||
<DOI name="Mod">
|
||||
<DAI name="stVal">
|
||||
<Val>on</Val>
|
||||
</DAI>
|
||||
<DAI name="ctlModel">
|
||||
<Val>status-only</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="Beh" desc="Behaviour">
|
||||
<DAI name="stVal">
|
||||
<Val>on</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="NamPlt" desc="NamPlt">
|
||||
<DAI name="ldNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="SenNum" desc="SenNum">
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
</LN0>
|
||||
<LN lnType="xyLPHD" lnClass="LPHD" inst="1">
|
||||
<DOI name="PhyHealth">
|
||||
<DAI name="stVal">
|
||||
<Val>Ok</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="OutOv">
|
||||
<DAI name="stVal">
|
||||
<Val>0</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="Proxy">
|
||||
<DAI name="stVal">
|
||||
<Val>0</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="SntpAddr">
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="TimeZone">
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
</LN>
|
||||
<LN lnType="xySIML" lnClass="SIML" inst="01" desc="油色谱监测" ext:uri="">
|
||||
<DOI name="Mod">
|
||||
<DAI name="stVal">
|
||||
<Val>on</Val>
|
||||
</DAI>
|
||||
<DAI name="ctlModel">
|
||||
<Val>status-only</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="Beh" desc="Behaviour">
|
||||
<DAI name="stVal">
|
||||
<Val>on</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="Health" desc="Health">
|
||||
<DAI name="stVal">
|
||||
<Val>Ok</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="NamPlt" desc="NamPlt">
|
||||
<DAI name="ldNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="Tmp" desc="绝缘液体温度">
|
||||
<DAI name="dU">
|
||||
<Val>绝缘液体温度(Mpa)</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="H2" desc="氢气含量(ul/l)">
|
||||
<DAI name="dU">
|
||||
<Val>氢气含量</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="CO" desc="氢气含量(ul/l)">
|
||||
<DAI name="dU">
|
||||
<Val>氢气含量</Val>
|
||||
</DAI>
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="CH4" desc="甲烷含量(ul/l)">
|
||||
<DAI name="dU">
|
||||
<Val>甲烷含量(ul/l)</Val>
|
||||
</DAI>
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="C2H4" desc="乙烯含量(ul/l)">
|
||||
<DAI name="dU">
|
||||
<Val>乙烯含量(ul/l)</Val>
|
||||
</DAI>
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="C2H6" desc="乙烷含量(ul/l)">
|
||||
<DAI name="dU">
|
||||
<Val>乙烷含量(ul/l)</Val>
|
||||
</DAI>
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="C2H2" desc="乙炔含量(ul/l)">
|
||||
<DAI name="dU">
|
||||
<Val>乙炔含量(ul/l)</Val>
|
||||
</DAI>
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="TotHyd" desc="总烃含量(ul/l)">
|
||||
<DAI name="dU">
|
||||
<Val>总烃含量(ul/l)</Val>
|
||||
</DAI>
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="SmpTm" desc="采样时间">
|
||||
<DAI name="dU">
|
||||
<Val>采样时间</Val>
|
||||
</DAI>
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="CO2" desc="二氧化碳含量(ul/l)">
|
||||
<DAI name="dU">
|
||||
<Val>二氧化碳含量(ul/l)</Val>
|
||||
</DAI>
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="MicrWat" desc="微水含量(ul/l)">
|
||||
<DAI name="dU">
|
||||
<Val>微水含量(ul/l)</Val>
|
||||
</DAI>
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="GasPres" desc="载气压力(Mpa)">
|
||||
<DAI name="dU">
|
||||
<Val>载气压力(Mpa)</Val>
|
||||
</DAI>
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="GasBot" desc="异常的气瓶号">
|
||||
<DAI name="dU">
|
||||
<Val>异常的气瓶号</Val>
|
||||
</DAI>
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="MoDevConf" desc="监测装置通讯状态">
|
||||
<DAI name="dU">
|
||||
<Val>监测装置通讯状态</Val>
|
||||
</DAI>
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="SupDevRun" desc="监测装置运行状态">
|
||||
<DAI name="dU">
|
||||
<Val>监测装置运行状态</Val>
|
||||
</DAI>
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="GasUnPresAlm" desc="载气欠压告警">
|
||||
<DAI name="dU">
|
||||
<Val>载气欠压告警</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="GasLowPresAlm" desc="载气低压告警">
|
||||
<DAI name="dU">
|
||||
<Val>载气低压告警</Val>
|
||||
</DAI>
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="ActCyGasSta" desc="实际气瓶供气状态异常">
|
||||
<DAI name="dU">
|
||||
<Val>实际气瓶供气状态异常</Val>
|
||||
</DAI>
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="SamInteC" desc="采集间隔(min)">
|
||||
<DAI name="dU">
|
||||
<Val>采集间隔(min)</Val>
|
||||
</DAI>
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="StartWork" desc="立即开始工作">
|
||||
<DAI name="dU">
|
||||
<Val>立即开始工作</Val>
|
||||
</DAI>
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="NextWorkTime" desc="次采集时间(min)">
|
||||
<DAI name="dU">
|
||||
<Val>次采集时间(min)</Val>
|
||||
</DAI>
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="ReStart" desc="立即重载">
|
||||
<DAI name="dU">
|
||||
<Val>立即重载(Mpa)</Val>
|
||||
</DAI>
|
||||
<DAI name="dataNs">
|
||||
<Val>ZPEPC MODEL:2008</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
</LN>
|
||||
</LDevice>
|
||||
</Server>
|
||||
</AccessPoint>
|
||||
</IED>
|
||||
<DataTypeTemplates>
|
||||
<LNodeType id="xyLN0" lnClass="LLN0">
|
||||
<DO name="Mod" type="CN_INC_Mod" desc="Mode"/>
|
||||
<DO name="Beh" type="CN_INS_Beh" desc="Behaviour"/>
|
||||
<DO name="Health" type="CN_INS_Health" desc="Health"/>
|
||||
<DO name="NamPlt" type="CN_LPL_LN0" desc="Name Plate"/>
|
||||
<!--DO name="LEDRs" type="CN_SPC_DC" desc="LED reset "/-->
|
||||
<DO name="SenNum" type="CN_ING_SP_EX" desc="传感器通道数"/>
|
||||
</LNodeType>
|
||||
<LNodeType id="xyLPHD" lnClass="LPHD">
|
||||
<DO name="PhyNam" type="CN_DPL" desc="Physical device name plate"/>
|
||||
<DO name="PhyHealth" type="CN_INS_Health" desc="Physical device health"/>
|
||||
<DO name="OutOv" type="CN_SPS" desc="Output communications buffer overflow"/>
|
||||
<DO name="Proxy" type="CN_SPS" desc="Indicates if this LN is a proxy"/>
|
||||
<DO name="SntpAddr" type="CN_ING_SP_EX"/>
|
||||
<DO name="TimeZone" type="CN_ING_SP_EX"/>
|
||||
</LNodeType>
|
||||
<!--LNodeType id="xySPDC" lnClass="SPDC" desc="局部放电逻辑节点模板">
|
||||
<DO name="Mod" type="CN_INC_Mod" desc="Mode"/>
|
||||
<DO name="Beh" type="CN_INS_Beh" desc="Behaviour"/>
|
||||
<DO name="Health" type="CN_INS_Health" desc="Health"/>
|
||||
<DO name="NamPlt" type="CN_LPL_LN0" desc="Name Plate"/>
|
||||
<DO name="OpCnt" type="CN_INS" desc="Operation counter"/>
|
||||
<DO name="SenMP" type="CN_INS_EX" desc="传感器测点位置"/>
|
||||
<DO name="IfPaDis" type="CN_SPS_EX" desc="是否发生局部放电"/>
|
||||
<DO name="MoDevConf" type="CN_SPS_EX" desc="在线监测装置通讯状态"/>
|
||||
<DO name="SupDevRun" type="CN_SPS_EX" desc="在线监测装置运行状态"/>
|
||||
<DO name="MvPaDis" type="CN_MV_EX" desc="局部放电量最大值"/>
|
||||
<DO name="DisPha" type="CN_MV_EX" desc="放电相位"/>
|
||||
<DO name="DisCount" type="CN_MV_I_EX" desc="放电次数"/>
|
||||
<DO name="SamInteC" type="CN_ASG_SP_EX" desc="采样时间间隔"/>
|
||||
</LNodeType-->
|
||||
<LNodeType id="xyXSWI" lnClass="XSWI" desc="开关柜触头测温逻辑节点模板">
|
||||
<DO name="Mod" type="CN_INC_Mod" desc="Mode"/>
|
||||
<DO name="Beh" type="CN_INS_Beh" desc="Behaviour"/>
|
||||
<DO name="Health" type="CN_INS_Health" desc="Health"/>
|
||||
<DO name="NamPlt" type="CN_LPL_LN0" desc="Name Plate"/>
|
||||
<DO name="TmpAUp" type="CN_MV_EX" desc="A相上触点温度"/>
|
||||
<DO name="TmpADown" type="CN_MV_EX" desc="A相下触点温度"/>
|
||||
<DO name="TmpABus" type="CN_MV_EX" desc="A相母排触点温度"/>
|
||||
<DO name="TmpBUp" type="CN_MV_EX" desc="B相上触点温度"/>
|
||||
<DO name="TmpBDown" type="CN_MV_EX" desc="B相下触点温度"/>
|
||||
<DO name="TmpBBus" type="CN_MV_EX" desc="B相母排触点温度"/>
|
||||
<DO name="TmpCUp" type="CN_MV_EX" desc="C相上触点温度"/>
|
||||
<DO name="TmpCDown" type="CN_MV_EX" desc="C相下触点温度"/>
|
||||
<DO name="TmpCBus" type="CN_MV_EX" desc="C相母排触点温度"/>
|
||||
<DO name="MoDevConf" type="CN_SPS_EX" desc="在线监测装置通讯状态"/>
|
||||
<DO name="SupDevRun" type="CN_SPS_EX" desc="在线监测装置运行状态"/>
|
||||
<DO name="Loc" type="CN_SPS" desc="Local operation"/>
|
||||
<DO name="OpCnt" type="CN_INS" desc="Operation counter"/>
|
||||
<DO name="Pos" type="CN_DPC_DC" desc="Switch position"/>
|
||||
<DO name="BlkOpn" type="CN_SPC_DC" desc="Block opening"/>
|
||||
<DO name="BlkCls" type="CN_SPC_DC" desc="Block closing"/>
|
||||
<DO name="SwTyp" type="CN_INS" desc="Switch type"/>
|
||||
<DO name="SwOpCap" type="CN_INS" desc="Switch operating capability"/>
|
||||
<DO name="SamInteC" type="CN_ASG_SP_EX" desc="采样时间间隔"/>
|
||||
</LNodeType>
|
||||
<LNodeType id="xyTCTR" lnClass="TCTR" desc="容性设备监测逻辑节点模板">
|
||||
<DO name="Mod" type="CN_INC_Mod" desc="Mode"/>
|
||||
<DO name="Beh" type="CN_INS_Beh" desc="Behaviour"/>
|
||||
<DO name="Health" type="CN_INS_Health" desc="Health"/>
|
||||
<DO name="NamPlt" type="CN_LPL_LN0" desc="Name Plate"/>
|
||||
<DO name="Amp" type="CN_SAV" desc="电流(采样值)"/>
|
||||
<DO name="RelAmp" type="CN_MV_EX" desc="泄露电流"/>
|
||||
<DO name="DieLoss" type="CN_MV_EX" desc="介损"/>
|
||||
<DO name="Capac" type="CN_MV_EX" desc="电容"/>
|
||||
<DO name="MoDevConf" type="CN_SPS_EX" desc="在线监测装置通讯状态"/>
|
||||
<DO name="SupDevRun" type="CN_SPS_EX" desc="在线监测装置运行状态"/>
|
||||
<!--DO name="MSFC" type="CN_ASG_SP_EX" desc="测量采样频率"/-->
|
||||
</LNodeType>
|
||||
<!--LNodeType id="xyZSAR" lnClass="ZSAR" desc="避雷器监测逻辑节点模板">
|
||||
<DO name="Mod" type="CN_INC_Mod" desc="Mode"/>
|
||||
<DO name="Beh" type="CN_INS_Beh" desc="Behaviour"/>
|
||||
<DO name="Health" type="CN_INS_Health" desc="Health"/>
|
||||
<DO name="NamPlt" type="CN_LPL_LN0" desc="Name Plate"/>
|
||||
<DO name="MoDevConf" type="CN_SPS_EX" desc="在线监测装置通讯状态"/>
|
||||
<DO name="SupDevRun" type="CN_SPS_EX" desc="在线监测装置运行状态"/>
|
||||
<DO name="LeakCur" type="CN_MV_EX" desc="泄露电流(uA)"/>
|
||||
<DO name="ReCur" type="CN_MV_EX" desc="阻性电流(uA)"/>
|
||||
<DO name="LigTm" type="CN_MV_I_EX" desc="落雷时间"/>
|
||||
<DO name="OpCnt" type="CN_MV_I_EX" desc="动作次数"/>
|
||||
<DO name="MSFC" type="CN_ASG_SP_EX" desc="测量采样频率"/>
|
||||
</LNodeType-->
|
||||
<!--LNodeType id="xySPTR" lnClass="SPTR" desc="变压器监测逻辑节点模板">
|
||||
<DO name="Mod" type="CN_INC_Mod" desc="Mode"/>
|
||||
<DO name="Beh" type="CN_INS_Beh" desc="Behaviour"/>
|
||||
<DO name="Health" type="CN_INS_Health" desc="Health"/>
|
||||
<DO name="NamPlt" type="CN_LPL_LN0" desc="Name Plate"/>
|
||||
<DO name="MoDevConf" type="CN_SPS_EX" desc="在线监测装置通讯状态"/>
|
||||
<DO name="SupDevRun" type="CN_SPS_EX" desc="在线监测装置运行状态"/>
|
||||
<DO name="CGAmp" type="CN_MV_EX" desc="铁芯接地电流(mA)"/>
|
||||
<DO name="MSFC" type="CN_ASG_SP_EX" desc="测量采样频率"/>
|
||||
</LNodeType-->
|
||||
<LNodeType id="xySIML" lnClass="SIML" desc="油色谱逻辑节点模板">
|
||||
<DO name="Mod" type="CN_INC_Mod" desc="Mode"/>
|
||||
<DO name="Beh" type="CN_INS_Beh" desc="Behaviour"/>
|
||||
<DO name="Health" type="CN_INS_Health" desc="Health"/>
|
||||
<DO name="NamPlt" type="CN_LPL_LN0" desc="Name Plate"/>
|
||||
<DO name="Tmp" type="CN_MV" desc="绝缘液体温度"/>
|
||||
<DO name="H2" type="CN_MV" desc="氢气含量(ul/l)"/>
|
||||
<DO name="CO" type="CN_MV_EX" desc="一氧化碳含量(ul/l)"/>
|
||||
<DO name="CH4" type="CN_MV_EX" desc="甲烷含量(ul/l)"/>
|
||||
<DO name="C2H4" type="CN_MV_EX" desc="乙烯含量(ul/l)"/>
|
||||
<DO name="C2H6" type="CN_MV_EX" desc="乙烷含量(ul/l)"/>
|
||||
<DO name="C2H2" type="CN_MV_EX" desc="乙炔含量(ul/l)"/>
|
||||
<DO name="TotHyd" type="CN_MV_EX" desc="总烃含量(ul/l)"/>
|
||||
<DO name="SmpTm" type="CN_MV_I_EX" desc="采样时间"/>
|
||||
<DO name="CO2" type="CN_MV_EX" desc="二氧化碳含量(ul/l)"/>
|
||||
<DO name="MicrWat" type="CN_MV_EX" desc="微水含量(ul/L)"/>
|
||||
<DO name="GasPres" type="CN_MV_EX" desc="载气压力(Mpa)"/>
|
||||
<DO name="GasBot" type="CN_MV_I_EX" desc="异常的气瓶号"/>
|
||||
<DO name="InsAlm" type="CN_SPS" desc="载气欠压告警"/>
|
||||
<DO name="MoDevConf" type="CN_SPS_EX" desc="IED与监测设备通讯异常"/>
|
||||
<DO name="SupDevRun" type="CN_SPS_EX" desc="监测设备运行异常"/>
|
||||
<DO name="GasUnPresAlm" type="CN_SPS_EX" desc="载气欠压告警"/>
|
||||
<DO name="GasLowPresAlm" type="CN_SPS_EX" desc="载气低压告警"/>
|
||||
<DO name="ActCyGasSta" type="CN_SPS_EX" desc="实际气瓶供气状态异常"/>
|
||||
<DO name="SamInteC" type="CN_ING_SG_EX" desc="采集间隔(min)"/>
|
||||
<DO name="StartWork" type="CN_ING_SG_EX" desc="立即开始工作(0-1)"/>
|
||||
<DO name="NextWorkTime" type="CN_ING_SG_EX" desc="下次采集时间(min)"/>
|
||||
<DO name="ReStart" type="CN_ING_SG_EX" desc="立即重载"/>
|
||||
</LNodeType>
|
||||
<DOType id="CN_INC_Mod" cdc="INC">
|
||||
<DA name="stVal" bType="Enum" type="Mod" dchg="true" fc="ST"/>
|
||||
<DA name="q" bType="Quality" qchg="true" fc="ST"/>
|
||||
<DA name="t" bType="Timestamp" fc="ST"/>
|
||||
<DA name="ctlModel" bType="Enum" type="ctlModel" fc="CF"/>
|
||||
</DOType>
|
||||
<DOType id="CN_SPS" cdc="SPS">
|
||||
<DA name="stVal" bType="BOOLEAN" dchg="true" fc="ST"/>
|
||||
<DA name="q" bType="Quality" qchg="true" fc="ST"/>
|
||||
<DA name="t" bType="Timestamp" fc="ST"/>
|
||||
<DA name="subEna" bType="BOOLEAN" fc="SV"/>
|
||||
<DA name="subVal" bType="BOOLEAN" fc="SV"/>
|
||||
<DA name="subQ" bType="Quality" fc="SV"/>
|
||||
<DA name="subID" bType="VisString64" fc="SV"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
</DOType>
|
||||
<DOType id="CN_SPS_EX" cdc="SPS">
|
||||
<DA name="stVal" bType="BOOLEAN" dchg="true" fc="ST"/>
|
||||
<DA name="q" bType="Quality" qchg="true" fc="ST"/>
|
||||
<DA name="t" bType="Timestamp" fc="ST"/>
|
||||
<DA name="subEna" bType="BOOLEAN" fc="SV"/>
|
||||
<DA name="subVal" bType="BOOLEAN" fc="SV"/>
|
||||
<DA name="subQ" bType="Quality" fc="SV"/>
|
||||
<DA name="subID" bType="VisString64" fc="SV"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
<DA name="dataNs" bType="VisString255" fc="EX"/>
|
||||
</DOType>
|
||||
<!--DOType id="CN_DPS" cdc="DPS">
|
||||
<DA name="stVal" bType="Enum" type="Dbpos" dchg="true" fc="ST"/>
|
||||
<DA name="q" bType="Quality" qchg="true" fc="ST"/>
|
||||
<DA name="t" bType="Timestamp" fc="ST"/>
|
||||
<DA name="subEna" bType="BOOLEAN" fc="SV"/>
|
||||
<DA name="subVal" bType="Enum" type="Dbpos" fc="SV"/>
|
||||
<DA name="subQ" bType="Quality" fc="SV"/>
|
||||
<DA name="subID" bType="VisString64" fc="SV"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
</DOType>
|
||||
<DOType id="CN_ENS_MECH" cdc="ENS">
|
||||
<DA name="stVal" bType="Enum" type="Health" dchg="true" fc="ST"/>
|
||||
<DA name="q" bType="Quality" qchg="true" fc="ST"/>
|
||||
<DA name="t" bType="Timestamp" fc="ST"/>
|
||||
<DA name="subEna" bType="BOOLEAN" fc="SV"/>
|
||||
<DA name="subVal" bType="Enum" type="Health" fc="SV"/>
|
||||
<DA name="subQ" bType="Quality" fc="SV"/>
|
||||
<DA name="subID" bType="VisString64" fc="SV"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
</DOType-->
|
||||
<DOType id="CN_INS" cdc="INS">
|
||||
<DA name="stVal" bType="INT32" dchg="true" fc="ST"/>
|
||||
<DA name="q" bType="Quality" qchg="true" fc="ST"/>
|
||||
<DA name="t" bType="Timestamp" fc="ST"/>
|
||||
<DA name="subEna" bType="BOOLEAN" fc="SV"/>
|
||||
<DA name="subVal" bType="INT32" fc="SV"/>
|
||||
<DA name="subQ" bType="Quality" fc="SV"/>
|
||||
<DA name="subID" bType="VisString64" fc="SV"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
</DOType>
|
||||
<DOType id="CN_INS_EX" cdc="INS">
|
||||
<DA name="stVal" bType="INT32" dchg="true" fc="ST"/>
|
||||
<DA name="q" bType="Quality" qchg="true" fc="ST"/>
|
||||
<DA name="t" bType="Timestamp" fc="ST"/>
|
||||
<DA name="subEna" bType="BOOLEAN" fc="SV"/>
|
||||
<DA name="subVal" bType="INT32" fc="SV"/>
|
||||
<DA name="subQ" bType="Quality" fc="SV"/>
|
||||
<DA name="subID" bType="VisString64" fc="SV"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
<DA name="dataNs" bType="VisString255" fc="EX"/>
|
||||
</DOType>
|
||||
<DOType id="CN_INS_Beh" cdc="INS">
|
||||
<DA name="stVal" bType="Enum" type="Beh" dchg="true" fc="ST"/>
|
||||
<DA name="q" bType="Quality" qchg="true" fc="ST"/>
|
||||
<DA name="t" bType="Timestamp" fc="ST"/>
|
||||
</DOType>
|
||||
<DOType id="CN_INS_Health" cdc="INS">
|
||||
<DA name="stVal" bType="Enum" type="Health" dchg="true" fc="ST"/>
|
||||
<DA name="q" bType="Quality" qchg="true" fc="ST"/>
|
||||
<DA name="t" bType="Timestamp" fc="ST"/>
|
||||
</DOType>
|
||||
<DOType id="CN_LPL_LN0" cdc="LPL">
|
||||
<DA name="vendor" bType="VisString255" fc="DC"/>
|
||||
<DA name="swRev" bType="VisString255" fc="DC"/>
|
||||
<DA name="d" bType="VisString255" fc="DC"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
<DA name="configRev" bType="VisString255" fc="DC"/>
|
||||
<DA name="ldNs" bType="VisString255" fc="EX"/>
|
||||
</DOType>
|
||||
<DOType id="CN_DPL" cdc="DPL">
|
||||
<DA name="vendor" bType="VisString255" fc="DC"/>
|
||||
<DA name="hwRev" bType="VisString255" fc="DC"/>
|
||||
<DA name="swRev" bType="VisString255" fc="DC"/>
|
||||
<DA name="serNum" bType="VisString255" fc="DC"/>
|
||||
<DA name="model" bType="VisString255" fc="DC"/>
|
||||
<DA name="location" bType="VisString255" fc="DC"/>
|
||||
</DOType>
|
||||
<DOType id="CN_SAV" cdc="SAV">
|
||||
<DA name="instMag" bType="Struct" type="CN_AnalogueValue" dchg="true" fc="MX"/>
|
||||
<DA name="q" bType="Quality" qchg="true" fc="MX"/>
|
||||
<DA name="t" bType="Timestamp" fc="MX"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
</DOType>
|
||||
<DOType id="CN_MV_I" cdc="MV">
|
||||
<DA name="mag" bType="Struct" type="CN_AnalogueValue_I" dchg="true" fc="MX"/>
|
||||
<DA name="q" bType="Quality" qchg="true" fc="MX"/>
|
||||
<DA name="t" bType="Timestamp" fc="MX"/>
|
||||
<DA name="subEna" bType="BOOLEAN" fc="SV"/>
|
||||
<DA name="subMag" bType="Struct" type="CN_AnalogueValue_I" fc="SV"/>
|
||||
<DA name="subQ" bType="Quality" fc="SV"/>
|
||||
<DA name="subID" bType="VisString64" fc="SV"/>
|
||||
<DA name="units" bType="Struct" type="CN_units" fc="CF"/>
|
||||
<DA name="db" bType="INT32U" fc="CF"/>
|
||||
<DA name="zeroDb" bType="INT32U" fc="CF"/>
|
||||
<DA name="sVC" bType="Struct" type="CN_ScaledValueConfig" fc="CF"/>
|
||||
<DA name="rangeC" bType="Struct" type="CN_RangeConfig" fc="CF"/>
|
||||
<DA name="smpRate" bType="INT32U" fc="CF"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
</DOType>
|
||||
<DOType id="CN_MV_I_EX" cdc="MV">
|
||||
<DA name="mag" bType="Struct" type="CN_AnalogueValue_I" dchg="true" fc="MX"/>
|
||||
<DA name="q" bType="Quality" qchg="true" fc="MX"/>
|
||||
<DA name="t" bType="Timestamp" fc="MX"/>
|
||||
<DA name="subEna" bType="BOOLEAN" fc="SV"/>
|
||||
<DA name="subMag" bType="Struct" type="CN_AnalogueValue_I" fc="SV"/>
|
||||
<DA name="subQ" bType="Quality" fc="SV"/>
|
||||
<DA name="subID" bType="VisString64" fc="SV"/>
|
||||
<DA name="units" bType="Struct" type="CN_units" fc="CF"/>
|
||||
<DA name="db" bType="INT32U" fc="CF"/>
|
||||
<DA name="zeroDb" bType="INT32U" fc="CF"/>
|
||||
<DA name="sVC" bType="Struct" type="CN_ScaledValueConfig" fc="CF"/>
|
||||
<DA name="rangeC" bType="Struct" type="CN_RangeConfig" fc="CF"/>
|
||||
<DA name="smpRate" bType="INT32U" fc="CF"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
<DA name="dataNs" bType="VisString255" fc="EX"/>
|
||||
</DOType>
|
||||
<DOType id="CN_MV" cdc="MV">
|
||||
<DA name="mag" bType="Struct" type="CN_AnalogueValue" dchg="true" fc="MX"/>
|
||||
<DA name="q" bType="Quality" qchg="true" fc="MX"/>
|
||||
<DA name="t" bType="Timestamp" fc="MX"/>
|
||||
<DA name="subEna" bType="BOOLEAN" fc="SV"/>
|
||||
<DA name="subMag" bType="Struct" type="CN_AnalogueValue" fc="SV"/>
|
||||
<DA name="subQ" bType="Quality" fc="SV"/>
|
||||
<DA name="subID" bType="VisString64" fc="SV"/>
|
||||
<DA name="units" bType="Struct" type="CN_units" fc="CF"/>
|
||||
<DA name="db" bType="INT32U" fc="CF"/>
|
||||
<DA name="zeroDb" bType="INT32U" fc="CF"/>
|
||||
<DA name="sVC" bType="Struct" type="CN_ScaledValueConfig" fc="CF"/>
|
||||
<DA name="rangeC" bType="Struct" type="CN_RangeConfig" fc="CF"/>
|
||||
<DA name="smpRate" bType="INT32U" fc="CF"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
</DOType>
|
||||
<DOType id="CN_MV_EX" cdc="MV">
|
||||
<DA name="mag" bType="Struct" type="CN_AnalogueValue" dchg="true" fc="MX"/>
|
||||
<DA name="q" bType="Quality" qchg="true" fc="MX"/>
|
||||
<DA name="t" bType="Timestamp" fc="MX"/>
|
||||
<DA name="subEna" bType="BOOLEAN" fc="SV"/>
|
||||
<DA name="subMag" bType="Struct" type="CN_AnalogueValue" fc="SV"/>
|
||||
<DA name="subQ" bType="Quality" fc="SV"/>
|
||||
<DA name="subID" bType="VisString64" fc="SV"/>
|
||||
<DA name="units" bType="Struct" type="CN_units" fc="CF"/>
|
||||
<DA name="db" bType="INT32U" fc="CF"/>
|
||||
<DA name="zeroDb" bType="INT32U" fc="CF"/>
|
||||
<DA name="sVC" bType="Struct" type="CN_ScaledValueConfig" fc="CF"/>
|
||||
<DA name="rangeC" bType="Struct" type="CN_RangeConfig" fc="CF"/>
|
||||
<DA name="smpRate" bType="INT32U" fc="CF"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
<DA name="dataNs" bType="VisString255" fc="EX"/>
|
||||
</DOType>
|
||||
<DOType id="CN_ING_SG" cdc="ING">
|
||||
<DA name="setVal" bType="INT32" fc="SG"/>
|
||||
<DA name="minVal" bType="INT32" fc="CF"/>
|
||||
<DA name="maxVal" bType="INT32" fc="CF"/>
|
||||
<DA name="stepSize" bType="INT32U" fc="CF"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
</DOType>
|
||||
<DOType id="CN_ING_SG_EX" cdc="ING">
|
||||
<DA name="setVal" bType="INT32" fc="SG"/>
|
||||
<DA name="minVal" bType="INT32" fc="CF"/>
|
||||
<DA name="maxVal" bType="INT32" fc="CF"/>
|
||||
<DA name="stepSize" bType="INT32U" fc="CF"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
<DA name="dataNs" bType="VisString255" fc="EX"/>
|
||||
</DOType>
|
||||
<DOType id="CN_ING_SP" cdc="ING">
|
||||
<DA name="setVal" bType="INT32" fc="SP"/>
|
||||
<DA name="minVal" bType="INT32" fc="CF"/>
|
||||
<DA name="maxVal" bType="INT32" fc="CF"/>
|
||||
<DA name="stepSize" bType="INT32U" fc="CF"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
</DOType>
|
||||
<DOType id="CN_ING_SP_EX" cdc="ING">
|
||||
<DA name="setVal" bType="INT32" fc="SP"/>
|
||||
<DA name="minVal" bType="INT32" fc="CF"/>
|
||||
<DA name="maxVal" bType="INT32" fc="CF"/>
|
||||
<DA name="stepSize" bType="INT32U" fc="CF"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
<DA name="dataNs" bType="VisString255" fc="EX"/>
|
||||
</DOType>
|
||||
<DOType id="CN_ASG_SG" cdc="ASG">
|
||||
<DA name="setMag" bType="Struct" type="CN_AnalogueValue" fc="SG"/>
|
||||
<DA name="units" bType="Struct" type="CN_units" fc="CF"/>
|
||||
<DA name="sVC" bType="Struct" type="CN_ScaledValueConfig" fc="CF"/>
|
||||
<DA name="minVal" bType="Struct" type="CN_AnalogueValue" fc="CF"/>
|
||||
<DA name="maxVal" bType="Struct" type="CN_AnalogueValue" fc="CF"/>
|
||||
<DA name="stepSize" bType="Struct" type="CN_AnalogueValue" fc="CF"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
</DOType>
|
||||
<DOType id="CN_ASG_SG_EX" cdc="ASG">
|
||||
<DA name="setMag" bType="Struct" type="CN_AnalogueValue" fc="SG"/>
|
||||
<DA name="units" bType="Struct" type="CN_units" fc="CF"/>
|
||||
<DA name="sVC" bType="Struct" type="CN_ScaledValueConfig" fc="CF"/>
|
||||
<DA name="minVal" bType="Struct" type="CN_AnalogueValue" fc="CF"/>
|
||||
<DA name="maxVal" bType="Struct" type="CN_AnalogueValue" fc="CF"/>
|
||||
<DA name="stepSize" bType="Struct" type="CN_AnalogueValue" fc="CF"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
<DA name="dataNs" bType="VisString255" fc="EX"/>
|
||||
</DOType>
|
||||
<DOType id="CN_ASG_SP" cdc="ASG">
|
||||
<DA name="setMag" bType="Struct" type="CN_AnalogueValue" fc="SP"/>
|
||||
<DA name="units" bType="Struct" type="CN_units" fc="CF"/>
|
||||
<DA name="sVC" bType="Struct" type="CN_ScaledValueConfig" fc="CF"/>
|
||||
<DA name="minVal" bType="Struct" type="CN_AnalogueValue" fc="CF"/>
|
||||
<DA name="maxVal" bType="Struct" type="CN_AnalogueValue" fc="CF"/>
|
||||
<DA name="stepSize" bType="Struct" type="CN_AnalogueValue" fc="CF"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
</DOType>
|
||||
<DOType id="CN_ASG_SP_EX" cdc="ASG">
|
||||
<DA name="setMag" bType="Struct" type="CN_AnalogueValue" fc="SP"/>
|
||||
<DA name="units" bType="Struct" type="CN_units" fc="CF"/>
|
||||
<DA name="sVC" bType="Struct" type="CN_ScaledValueConfig" fc="CF"/>
|
||||
<DA name="minVal" bType="Struct" type="CN_AnalogueValue" fc="CF"/>
|
||||
<DA name="maxVal" bType="Struct" type="CN_AnalogueValue" fc="CF"/>
|
||||
<DA name="stepSize" bType="Struct" type="CN_AnalogueValue" fc="CF"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
<DA name="dataNs" bType="VisString255" fc="EX"/>
|
||||
</DOType>
|
||||
<DOType id="CN_SPC_DC" cdc="SPC">
|
||||
<DA name="Oper" bType="Struct" type="CN_SBOw_Oper_SDPC" fc="CO"/>
|
||||
<DA name="stVal" bType="BOOLEAN" dchg="true" fc="ST"/>
|
||||
<DA name="q" bType="Quality" qchg="true" fc="ST"/>
|
||||
<DA name="t" bType="Timestamp" fc="ST"/>
|
||||
<DA name="subEna" bType="BOOLEAN" fc="SV"/>
|
||||
<DA name="subVal" bType="BOOLEAN" fc="SV"/>
|
||||
<DA name="subQ" bType="Quality" fc="SV"/>
|
||||
<DA name="subID" bType="VisString64" fc="SV"/>
|
||||
<DA name="pulseConfig" bType="Struct" type="CN_PulseConfig" fc="CF"/>
|
||||
<DA name="ctlModel" bType="Enum" type="ctlModel" fc="CF"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
</DOType>
|
||||
<DOType id="CN_DPC_DC" cdc="DPC">
|
||||
<DA name="Oper" bType="Struct" type="CN_SBOw_Oper_SDPC" fc="CO"/>
|
||||
<DA name="stVal" bType="Dbpos" dchg="true" fc="ST"/>
|
||||
<DA name="q" bType="Quality" qchg="true" fc="ST"/>
|
||||
<DA name="t" bType="Timestamp" fc="ST"/>
|
||||
<DA name="subEna" bType="BOOLEAN" fc="SV"/>
|
||||
<DA name="subVal" bType="Dbpos" fc="SV"/>
|
||||
<DA name="subQ" bType="Quality" fc="SV"/>
|
||||
<DA name="subID" bType="VisString64" fc="SV"/>
|
||||
<DA name="pulseConfig" bType="Struct" type="CN_PulseConfig" fc="CF"/>
|
||||
<DA name="ctlModel" bType="Enum" type="ctlModel" fc="CF"/>
|
||||
<DA name="dU" bType="Unicode255" fc="DC"/>
|
||||
</DOType>
|
||||
<DAType id="CN_SBOw_Oper_SDPC">
|
||||
<BDA name="ctlVal" bType="BOOLEAN"/>
|
||||
<BDA name="origin" bType="Struct" type="CN_Originator"/>
|
||||
<BDA name="ctlNum" bType="INT8U"/>
|
||||
<BDA name="T" bType="Timestamp"/>
|
||||
<BDA name="Test" bType="BOOLEAN"/>
|
||||
<BDA name="Check" bType="Check"/>
|
||||
</DAType>
|
||||
<DAType id="CN_Originator">
|
||||
<BDA name="orCat" bType="Enum" type="orCategory"/>
|
||||
<BDA name="orIdent" bType="Octet64"/>
|
||||
</DAType>
|
||||
<DAType id="CN_ScaledValueConfig">
|
||||
<BDA name="scaleFactor" bType="FLOAT32"/>
|
||||
<BDA name="offset" bType="FLOAT32"/>
|
||||
</DAType>
|
||||
<DAType id="CN_PulseConfig">
|
||||
<BDA name="cmdQual" bType="Enum" type="PulseConfigCmdQual"/>
|
||||
<BDA name="onDur" bType="INT32U"/>
|
||||
<BDA name="offDur" bType="INT32U"/>
|
||||
<BDA name="numPls" bType="INT32U"/>
|
||||
</DAType>
|
||||
<DAType id="CN_units">
|
||||
<BDA name="SIUnit" bType="Enum" type="SIUnit"/>
|
||||
<BDA name="multiplier" bType="Enum" type="multiplier"/>
|
||||
</DAType>
|
||||
<DAType id="CN_AnalogueValue_I">
|
||||
<BDA name="i" bType="INT32"/>
|
||||
</DAType>
|
||||
<DAType id="CN_AnalogueValue">
|
||||
<BDA name="f" bType="FLOAT32"/>
|
||||
</DAType>
|
||||
<DAType id="CN_RangeConfig">
|
||||
<BDA name="hhLim" bType="Struct" type="CN_AnalogueValue"/>
|
||||
<BDA name="hLim" bType="Struct" type="CN_AnalogueValue"/>
|
||||
<BDA name="lLim" bType="Struct" type="CN_AnalogueValue"/>
|
||||
<BDA name="llLim" bType="Struct" type="CN_AnalogueValue"/>
|
||||
<BDA name="min" bType="Struct" type="CN_AnalogueValue"/>
|
||||
<BDA name="max" bType="Struct" type="CN_AnalogueValue"/>
|
||||
</DAType>
|
||||
<EnumType id="PulseConfigCmdQual">
|
||||
<EnumVal ord="0">pulse</EnumVal>
|
||||
<EnumVal ord="1">persistent</EnumVal>
|
||||
</EnumType>
|
||||
<EnumType id="ctlModel">
|
||||
<EnumVal ord="0">status-only</EnumVal>
|
||||
<EnumVal ord="1">direct-with-normal-security</EnumVal>
|
||||
<EnumVal ord="2">sbo-with-normal-security</EnumVal>
|
||||
<EnumVal ord="3">direct-with-enhanced-security</EnumVal>
|
||||
<EnumVal ord="4">sbo-with-enhanced-security</EnumVal>
|
||||
</EnumType>
|
||||
<EnumType id="sboClass">
|
||||
<EnumVal ord="0">operate-once</EnumVal>
|
||||
<EnumVal ord="1">operate-many</EnumVal>
|
||||
</EnumType>
|
||||
<EnumType id="orCategory">
|
||||
<EnumVal ord="0">not-supported</EnumVal>
|
||||
<EnumVal ord="1">bay-control</EnumVal>
|
||||
<EnumVal ord="2">station-control</EnumVal>
|
||||
<EnumVal ord="3">remote-control</EnumVal>
|
||||
<EnumVal ord="4">automatic-bay</EnumVal>
|
||||
<EnumVal ord="5">automatic-station</EnumVal>
|
||||
<EnumVal ord="6">automatic-remote</EnumVal>
|
||||
<EnumVal ord="7">maintenance</EnumVal>
|
||||
<EnumVal ord="8">process</EnumVal>
|
||||
</EnumType>
|
||||
<EnumType id="Beh">
|
||||
<EnumVal ord="1">on</EnumVal>
|
||||
<EnumVal ord="2">blocked</EnumVal>
|
||||
<EnumVal ord="3">test</EnumVal>
|
||||
<EnumVal ord="4">test/blocked</EnumVal>
|
||||
<EnumVal ord="5">off</EnumVal>
|
||||
</EnumType>
|
||||
<EnumType id="Health">
|
||||
<EnumVal ord="1">Ok</EnumVal>
|
||||
<EnumVal ord="2">Warning</EnumVal>
|
||||
<EnumVal ord="3">Alarm</EnumVal>
|
||||
</EnumType>
|
||||
<EnumType id="Mod">
|
||||
<EnumVal ord="1">on</EnumVal>
|
||||
<EnumVal ord="2">blocked</EnumVal>
|
||||
<EnumVal ord="3">test</EnumVal>
|
||||
<EnumVal ord="4">test/blocked</EnumVal>
|
||||
<EnumVal ord="5">off</EnumVal>
|
||||
</EnumType>
|
||||
<EnumType id="SIUnit">
|
||||
<EnumVal ord="1">dimensionless</EnumVal>
|
||||
<EnumVal ord="2">m</EnumVal>
|
||||
<EnumVal ord="3">kg</EnumVal>
|
||||
<EnumVal ord="4">s</EnumVal>
|
||||
<EnumVal ord="5">A</EnumVal>
|
||||
<EnumVal ord="6">K</EnumVal>
|
||||
<EnumVal ord="7">mol</EnumVal>
|
||||
<EnumVal ord="8">cd</EnumVal>
|
||||
<EnumVal ord="9">deg</EnumVal>
|
||||
<EnumVal ord="10">rad</EnumVal>
|
||||
<EnumVal ord="11">sr</EnumVal>
|
||||
<EnumVal ord="21">Gy</EnumVal>
|
||||
<EnumVal ord="22">q</EnumVal>
|
||||
<EnumVal ord="23">°C</EnumVal>
|
||||
<EnumVal ord="24">Sv</EnumVal>
|
||||
<EnumVal ord="25">F</EnumVal>
|
||||
<EnumVal ord="26">C</EnumVal>
|
||||
<EnumVal ord="27">S</EnumVal>
|
||||
<EnumVal ord="28">H</EnumVal>
|
||||
<EnumVal ord="29">V</EnumVal>
|
||||
<EnumVal ord="30">ohm</EnumVal>
|
||||
<EnumVal ord="31">J</EnumVal>
|
||||
<EnumVal ord="32">N</EnumVal>
|
||||
<EnumVal ord="33">Hz</EnumVal>
|
||||
<EnumVal ord="34">lx</EnumVal>
|
||||
<EnumVal ord="35">Lm</EnumVal>
|
||||
<EnumVal ord="36">Wb</EnumVal>
|
||||
<EnumVal ord="37">T</EnumVal>
|
||||
<EnumVal ord="38">W</EnumVal>
|
||||
<EnumVal ord="39">Pa</EnumVal>
|
||||
<EnumVal ord="41">m²</EnumVal>
|
||||
<EnumVal ord="42">m³</EnumVal>
|
||||
<EnumVal ord="43">m/s</EnumVal>
|
||||
<EnumVal ord="44">m/s²</EnumVal>
|
||||
<EnumVal ord="45">m³/s</EnumVal>
|
||||
<EnumVal ord="46">m/m³</EnumVal>
|
||||
<EnumVal ord="47">M</EnumVal>
|
||||
<EnumVal ord="48">kg/m³</EnumVal>
|
||||
<EnumVal ord="49">m²/s</EnumVal>
|
||||
<EnumVal ord="50">W/m K</EnumVal>
|
||||
<EnumVal ord="51">J/K</EnumVal>
|
||||
<EnumVal ord="52">ppm</EnumVal>
|
||||
<EnumVal ord="53">1/s</EnumVal>
|
||||
<EnumVal ord="54">rad/s</EnumVal>
|
||||
<EnumVal ord="61">VA</EnumVal>
|
||||
<EnumVal ord="62">Watts</EnumVal>
|
||||
<EnumVal ord="63">VAr</EnumVal>
|
||||
<EnumVal ord="64">phi</EnumVal>
|
||||
<EnumVal ord="65">cos(phi)</EnumVal>
|
||||
<EnumVal ord="66">Vs</EnumVal>
|
||||
<EnumVal ord="67">V²</EnumVal>
|
||||
<EnumVal ord="68">As</EnumVal>
|
||||
<EnumVal ord="69">A²</EnumVal>
|
||||
<EnumVal ord="70">A²t</EnumVal>
|
||||
<EnumVal ord="71">VAh</EnumVal>
|
||||
<EnumVal ord="72">Wh</EnumVal>
|
||||
<EnumVal ord="73">VArh</EnumVal>
|
||||
<EnumVal ord="74">V/Hz</EnumVal>
|
||||
</EnumType>
|
||||
<EnumType id="multiplier">
|
||||
<EnumVal ord="-24">y</EnumVal>
|
||||
<EnumVal ord="-21">z</EnumVal>
|
||||
<EnumVal ord="-18">a</EnumVal>
|
||||
<EnumVal ord="-15">f</EnumVal>
|
||||
<EnumVal ord="-12">p</EnumVal>
|
||||
<EnumVal ord="-9">n</EnumVal>
|
||||
<EnumVal ord="-6">µ</EnumVal>
|
||||
<EnumVal ord="-3">m</EnumVal>
|
||||
<EnumVal ord="-2">c</EnumVal>
|
||||
<EnumVal ord="-1">d</EnumVal>
|
||||
<EnumVal ord="0"/>
|
||||
<EnumVal ord="1">da</EnumVal>
|
||||
<EnumVal ord="2">h</EnumVal>
|
||||
<EnumVal ord="3">k</EnumVal>
|
||||
<EnumVal ord="6">M</EnumVal>
|
||||
<EnumVal ord="9">G</EnumVal>
|
||||
<EnumVal ord="12">T</EnumVal>
|
||||
<EnumVal ord="15">P</EnumVal>
|
||||
<EnumVal ord="18">E</EnumVal>
|
||||
<EnumVal ord="21">Z</EnumVal>
|
||||
<EnumVal ord="24">Y</EnumVal>
|
||||
</EnumType>
|
||||
<EnumType id="Dbpos">
|
||||
<EnumVal ord="0">intermediate</EnumVal>
|
||||
<EnumVal ord="1">off</EnumVal>
|
||||
<EnumVal ord="2">on</EnumVal>
|
||||
<EnumVal ord="3">bad</EnumVal>
|
||||
</EnumType>
|
||||
</DataTypeTemplates>
|
||||
</SCL>
|
@ -0,0 +1,438 @@
|
||||
TIED10MONT LLN0$ST$Mod$stVal "string" type=Byte
|
||||
TIED10MONT LLN0$ST$Mod$q "string" type=BVstring13
|
||||
TIED10MONT LLN0$ST$Mod$t "string" type=Utctime
|
||||
TIED10MONT LLN0$ST$Beh$q "string" type=BVstring13
|
||||
TIED10MONT LLN0$ST$Beh$t "string" type=Utctime
|
||||
TIED10MONT LLN0$ST$Health$stVal "string" type=Byte
|
||||
TIED10MONT LLN0$ST$Health$q "string" type=BVstring13
|
||||
TIED10MONT LLN0$ST$Health$t "string" type=Utctime
|
||||
TIED10MONT LLN0$CF$Mod$ctlModel "string" type=Byte
|
||||
TIED10MONT LLN0$CF$SenNum$minVal "string" type=Long
|
||||
TIED10MONT LLN0$CF$SenNum$maxVal "string" type=Long
|
||||
TIED10MONT LLN0$CF$SenNum$stepSize "string" type=Ulong
|
||||
TIED10MONT LLN0$DC$NamPlt$vendor "string" type=Vstring255
|
||||
TIED10MONT LLN0$DC$NamPlt$swRev "string" type=Vstring255
|
||||
TIED10MONT LLN0$DC$NamPlt$d "string" type=Vstring255
|
||||
TIED10MONT LLN0$DC$NamPlt$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT LLN0$DC$NamPlt$configRev "string" type=Vstring255
|
||||
TIED10MONT LLN0$DC$SenNum$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT LLN0$SP$SenNum$setVal "string" type=Long
|
||||
TIED10MONT LLN0$EX$NamPlt$ldNs "string" type=Vstring255
|
||||
TIED10MONT LLN0$EX$SenNum$dataNs "string" type=Vstring255
|
||||
TIED10MONT LPHD1$ST$PhyHealth$stVal "string" type=Byte
|
||||
TIED10MONT LPHD1$ST$PhyHealth$q "string" type=BVstring13
|
||||
TIED10MONT LPHD1$ST$PhyHealth$t "string" type=Utctime
|
||||
TIED10MONT LPHD1$ST$OutOv$stVal "string" type=Bool
|
||||
TIED10MONT LPHD1$ST$OutOv$q "string" type=BVstring13
|
||||
TIED10MONT LPHD1$ST$OutOv$t "string" type=Utctime
|
||||
TIED10MONT LPHD1$ST$Proxy$stVal "string" type=Bool
|
||||
TIED10MONT LPHD1$ST$Proxy$q "string" type=BVstring13
|
||||
TIED10MONT LPHD1$ST$Proxy$t "string" type=Utctime
|
||||
TIED10MONT LPHD1$CF$SntpAddr$minVal "string" type=Long
|
||||
TIED10MONT LPHD1$CF$SntpAddr$maxVal "string" type=Long
|
||||
TIED10MONT LPHD1$CF$SntpAddr$stepSize "string" type=Ulong
|
||||
TIED10MONT LPHD1$CF$TimeZone$minVal "string" type=Long
|
||||
TIED10MONT LPHD1$CF$TimeZone$maxVal "string" type=Long
|
||||
TIED10MONT LPHD1$CF$TimeZone$stepSize "string" type=Ulong
|
||||
TIED10MONT LPHD1$DC$PhyNam$vendor "string" type=Vstring255
|
||||
TIED10MONT LPHD1$DC$PhyNam$hwRev "string" type=Vstring255
|
||||
TIED10MONT LPHD1$DC$PhyNam$swRev "string" type=Vstring255
|
||||
TIED10MONT LPHD1$DC$PhyNam$serNum "string" type=Vstring255
|
||||
TIED10MONT LPHD1$DC$PhyNam$model "string" type=Vstring255
|
||||
TIED10MONT LPHD1$DC$PhyNam$location "string" type=Vstring255
|
||||
TIED10MONT LPHD1$DC$OutOv$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT LPHD1$DC$Proxy$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT LPHD1$DC$SntpAddr$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT LPHD1$DC$TimeZone$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT LPHD1$SP$SntpAddr$setVal "string" type=Long
|
||||
TIED10MONT LPHD1$SP$TimeZone$setVal "string" type=Long
|
||||
TIED10MONT LPHD1$SV$OutOv$subEna "string" type=Bool
|
||||
TIED10MONT LPHD1$SV$OutOv$subVal "string" type=Bool
|
||||
TIED10MONT LPHD1$SV$OutOv$subQ "string" type=BVstring13
|
||||
TIED10MONT LPHD1$SV$OutOv$subID "string" type=Vstring64
|
||||
TIED10MONT LPHD1$SV$Proxy$subEna "string" type=Bool
|
||||
TIED10MONT LPHD1$SV$Proxy$subVal "string" type=Bool
|
||||
TIED10MONT LPHD1$SV$Proxy$subQ "string" type=BVstring13
|
||||
TIED10MONT LPHD1$SV$Proxy$subID "string" type=Vstring64
|
||||
TIED10MONT LPHD1$EX$SntpAddr$dataNs "string" type=Vstring255
|
||||
TIED10MONT LPHD1$EX$TimeZone$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$MX$Tmp$mag$f "0.0.10.0" type=Float
|
||||
TIED10MONT SIML01$MX$Tmp$q "0.0.10.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$Tmp$t "0.0.10.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$H2$mag$f "0.0.0.0" type=Float
|
||||
TIED10MONT SIML01$MX$H2$q "0.0.0.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$H2$t "0.0.0.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$CO$mag$f "0.0.1.0" type=Float
|
||||
TIED10MONT SIML01$MX$CO$q "0.0.1.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$CO$t "0.0.1.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$CH4$mag$f "0.0.2.0" type=Float
|
||||
TIED10MONT SIML01$MX$CH4$q "0.0.2.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$CH4$t "0.0.2.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$C2H4$mag$f "0.0.3.0" type=Float
|
||||
TIED10MONT SIML01$MX$C2H4$q "0.0.3.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$C2H4$t "0.0.3.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$C2H6$mag$f "0.0.4.0" type=Float
|
||||
TIED10MONT SIML01$MX$C2H6$q "0.0.4.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$C2H6$t "0.0.4.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$C2H2$mag$f "0.0.5.0" type=Float
|
||||
TIED10MONT SIML01$MX$C2H2$q "0.0.5.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$C2H2$t "0.0.5.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$TotHyd$mag$f "0.0.6.0" type=Float
|
||||
TIED10MONT SIML01$MX$TotHyd$q "0.0.6.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$TotHyd$t "0.0.6.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$SmpTm$mag$i "0.0.7.0" type=Long
|
||||
TIED10MONT SIML01$MX$SmpTm$q "0.0.7.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$SmpTm$t "0.0.7.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$CO2$mag$f "0.0.8.0" type=Float
|
||||
TIED10MONT SIML01$MX$CO2$q "0.0.8.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$CO2$t "0.0.8.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$MicrWat$mag$f "0.0.9.0" type=Float
|
||||
TIED10MONT SIML01$MX$MicrWat$q "0.0.9.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$MicrWat$t "0.0.9.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$GasPres$mag$f "0.0.11.0" type=Float
|
||||
TIED10MONT SIML01$MX$GasPres$q "0.0.11.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$GasPres$t "0.0.11.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$GasBot$mag$i "0.0.12.0" type=Long
|
||||
TIED10MONT SIML01$MX$GasBot$q "0.0.12.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$GasBot$t "0.0.12.2" type=Utctime
|
||||
TIED10MONT SIML01$ST$Mod$stVal "string" type=Byte
|
||||
TIED10MONT SIML01$ST$Mod$q "string" type=BVstring13
|
||||
TIED10MONT SIML01$ST$Mod$t "string" type=Utctime
|
||||
TIED10MONT SIML01$ST$Beh$q "string" type=BVstring13
|
||||
TIED10MONT SIML01$ST$Beh$t "string" type=Utctime
|
||||
TIED10MONT SIML01$ST$Health$stVal "string" type=Byte
|
||||
TIED10MONT SIML01$ST$Health$q "string" type=BVstring13
|
||||
TIED10MONT SIML01$ST$Health$t "string" type=Utctime
|
||||
TIED10MONT SIML01$ST$InsAlm$stVal "string" type=Bool
|
||||
TIED10MONT SIML01$ST$InsAlm$q "string" type=BVstring13
|
||||
TIED10MONT SIML01$ST$InsAlm$t "string" type=Utctime
|
||||
TIED10MONT SIML01$ST$MoDevConf$stVal "0.0.13.0" type=Bool
|
||||
TIED10MONT SIML01$ST$MoDevConf$q "0.0.13.1" type=BVstring13
|
||||
TIED10MONT SIML01$ST$MoDevConf$t "0.0.13.2" type=Utctime
|
||||
TIED10MONT SIML01$ST$SupDevRun$stVal "0.0.14.0" type=Bool
|
||||
TIED10MONT SIML01$ST$SupDevRun$q "0.0.14.1" type=BVstring13
|
||||
TIED10MONT SIML01$ST$SupDevRun$t "0.0.14.2" type=Utctime
|
||||
TIED10MONT SIML01$ST$GasUnPresAlm$stVal "0.0.15.0" type=Bool
|
||||
TIED10MONT SIML01$ST$GasUnPresAlm$q "0.0.15.1" type=BVstring13
|
||||
TIED10MONT SIML01$ST$GasUnPresAlm$t "0.0.15.2" type=Utctime
|
||||
TIED10MONT SIML01$ST$GasLowPresAlm$stVal "0.0.16.0" type=Bool
|
||||
TIED10MONT SIML01$ST$GasLowPresAlm$q "0.0.16.1" type=BVstring13
|
||||
TIED10MONT SIML01$ST$GasLowPresAlm$t "0.0.16.2" type=Utctime
|
||||
TIED10MONT SIML01$ST$ActCyGasSta$stVal "0.0.17.0" type=Bool
|
||||
TIED10MONT SIML01$ST$ActCyGasSta$q "0.0.17.1" type=BVstring13
|
||||
TIED10MONT SIML01$ST$ActCyGasSta$t "0.0.17.2" type=Utctime
|
||||
TIED10MONT SIML01$CF$Mod$ctlModel "string" type=Byte
|
||||
TIED10MONT SIML01$CF$Tmp$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$Tmp$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$Tmp$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$Tmp$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$Tmp$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$Tmp$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$Tmp$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$Tmp$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$Tmp$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$Tmp$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$Tmp$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$Tmp$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$Tmp$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$H2$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$H2$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$H2$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$H2$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$H2$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$H2$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$H2$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$H2$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$H2$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$H2$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$H2$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$H2$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$H2$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$CO$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$CO$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$CO$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$CO$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$CO$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$CH4$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$CH4$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$CH4$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$CH4$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$CH4$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$CH4$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$CH4$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CH4$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CH4$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CH4$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CH4$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CH4$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CH4$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$C2H4$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$C2H4$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$C2H4$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$C2H4$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$C2H4$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H4$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H4$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H4$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H4$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H4$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H4$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H4$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H4$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$C2H6$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$C2H6$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$C2H6$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$C2H6$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$C2H6$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H6$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H6$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H6$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H6$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H6$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H6$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H6$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H6$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$C2H2$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$C2H2$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$C2H2$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$C2H2$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$C2H2$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H2$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H2$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H2$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H2$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H2$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H2$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H2$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H2$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$TotHyd$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$TotHyd$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$TotHyd$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$TotHyd$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$TotHyd$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$TotHyd$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$TotHyd$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$TotHyd$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$TotHyd$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$TotHyd$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$TotHyd$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$TotHyd$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$TotHyd$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$SmpTm$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$SmpTm$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$SmpTm$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$SmpTm$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$SmpTm$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$SmpTm$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$SmpTm$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$SmpTm$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$SmpTm$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$SmpTm$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$SmpTm$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$SmpTm$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$SmpTm$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$CO2$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$CO2$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$CO2$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$CO2$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$CO2$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO2$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO2$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO2$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO2$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO2$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO2$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO2$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO2$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$MicrWat$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$MicrWat$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$MicrWat$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$MicrWat$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$MicrWat$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$MicrWat$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$MicrWat$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$MicrWat$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$MicrWat$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$MicrWat$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$MicrWat$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$MicrWat$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$MicrWat$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$GasPres$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$GasPres$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$GasPres$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$GasPres$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$GasPres$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasPres$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasPres$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasPres$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasPres$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasPres$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasPres$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasPres$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasPres$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$GasBot$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$GasBot$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$GasBot$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$GasBot$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$GasBot$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasBot$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasBot$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasBot$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasBot$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasBot$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasBot$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasBot$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasBot$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$SamInteC$minVal "string" type=Long
|
||||
TIED10MONT SIML01$CF$SamInteC$maxVal "string" type=Long
|
||||
TIED10MONT SIML01$CF$SamInteC$stepSize "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$StartWork$minVal "string" type=Long
|
||||
TIED10MONT SIML01$CF$StartWork$maxVal "string" type=Long
|
||||
TIED10MONT SIML01$CF$StartWork$stepSize "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$NextWorkTime$minVal "string" type=Long
|
||||
TIED10MONT SIML01$CF$NextWorkTime$maxVal "string" type=Long
|
||||
TIED10MONT SIML01$CF$NextWorkTime$stepSize "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$ReStart$minVal "string" type=Long
|
||||
TIED10MONT SIML01$CF$ReStart$maxVal "string" type=Long
|
||||
TIED10MONT SIML01$CF$ReStart$stepSize "string" type=Ulong
|
||||
TIED10MONT SIML01$DC$NamPlt$vendor "string" type=Vstring255
|
||||
TIED10MONT SIML01$DC$NamPlt$swRev "string" type=Vstring255
|
||||
TIED10MONT SIML01$DC$NamPlt$d "string" type=Vstring255
|
||||
TIED10MONT SIML01$DC$NamPlt$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$NamPlt$configRev "string" type=Vstring255
|
||||
TIED10MONT SIML01$DC$Tmp$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$H2$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$CO$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$CH4$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$C2H4$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$C2H6$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$C2H2$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$TotHyd$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$SmpTm$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$CO2$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$MicrWat$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$GasPres$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$GasBot$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$InsAlm$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$MoDevConf$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$SupDevRun$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$GasUnPresAlm$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$GasLowPresAlm$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$ActCyGasSta$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$SamInteC$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$StartWork$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$NextWorkTime$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$ReStart$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$SG$SamInteC$setVal "string" type=Long
|
||||
TIED10MONT SIML01$SG$StartWork$setVal "string" type=Long
|
||||
TIED10MONT SIML01$SG$NextWorkTime$setVal "string" type=Long
|
||||
TIED10MONT SIML01$SG$ReStart$setVal "string" type=Long
|
||||
TIED10MONT SIML01$SV$Tmp$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$Tmp$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$Tmp$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$Tmp$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$H2$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$H2$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$H2$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$H2$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$CO$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$CO$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$CO$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$CO$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$CH4$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$CH4$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$CH4$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$CH4$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$C2H4$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$C2H4$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$C2H4$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$C2H4$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$C2H6$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$C2H6$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$C2H6$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$C2H6$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$C2H2$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$C2H2$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$C2H2$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$C2H2$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$TotHyd$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$TotHyd$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$TotHyd$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$TotHyd$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$SmpTm$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$SmpTm$subMag$i "string" type=Long
|
||||
TIED10MONT SIML01$SV$SmpTm$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$SmpTm$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$CO2$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$CO2$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$CO2$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$CO2$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$MicrWat$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$MicrWat$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$MicrWat$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$MicrWat$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$GasPres$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$GasPres$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$GasPres$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$GasPres$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$GasBot$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$GasBot$subMag$i "string" type=Long
|
||||
TIED10MONT SIML01$SV$GasBot$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$GasBot$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$InsAlm$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$InsAlm$subVal "string" type=Bool
|
||||
TIED10MONT SIML01$SV$InsAlm$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$InsAlm$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$MoDevConf$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$MoDevConf$subVal "string" type=Bool
|
||||
TIED10MONT SIML01$SV$MoDevConf$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$MoDevConf$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$SupDevRun$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$SupDevRun$subVal "string" type=Bool
|
||||
TIED10MONT SIML01$SV$SupDevRun$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$SupDevRun$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$GasUnPresAlm$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$GasUnPresAlm$subVal "string" type=Bool
|
||||
TIED10MONT SIML01$SV$GasUnPresAlm$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$GasUnPresAlm$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$GasLowPresAlm$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$GasLowPresAlm$subVal "string" type=Bool
|
||||
TIED10MONT SIML01$SV$GasLowPresAlm$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$GasLowPresAlm$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$ActCyGasSta$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$ActCyGasSta$subVal "string" type=Bool
|
||||
TIED10MONT SIML01$SV$ActCyGasSta$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$ActCyGasSta$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SE$SamInteC$setVal "string" type=Long
|
||||
TIED10MONT SIML01$SE$StartWork$setVal "string" type=Long
|
||||
TIED10MONT SIML01$SE$NextWorkTime$setVal "string" type=Long
|
||||
TIED10MONT SIML01$SE$ReStart$setVal "string" type=Long
|
||||
TIED10MONT SIML01$EX$NamPlt$ldNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$CO$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$CH4$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$C2H4$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$C2H6$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$C2H2$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$TotHyd$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$SmpTm$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$CO2$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$MicrWat$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$GasPres$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$GasBot$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$MoDevConf$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$SupDevRun$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$GasUnPresAlm$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$GasLowPresAlm$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$ActCyGasSta$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$SamInteC$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$StartWork$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$NextWorkTime$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$ReStart$dataNs "string" type=Vstring255
|
@ -0,0 +1,438 @@
|
||||
TIED10MONT LLN0$ST$Mod$stVal "string" type=Byte
|
||||
TIED10MONT LLN0$ST$Mod$q "string" type=BVstring13
|
||||
TIED10MONT LLN0$ST$Mod$t "string" type=Utctime
|
||||
TIED10MONT LLN0$ST$Beh$q "string" type=BVstring13
|
||||
TIED10MONT LLN0$ST$Beh$t "string" type=Utctime
|
||||
TIED10MONT LLN0$ST$Health$stVal "string" type=Byte
|
||||
TIED10MONT LLN0$ST$Health$q "string" type=BVstring13
|
||||
TIED10MONT LLN0$ST$Health$t "string" type=Utctime
|
||||
TIED10MONT LLN0$CF$Mod$ctlModel "string" type=Byte
|
||||
TIED10MONT LLN0$CF$SenNum$minVal "string" type=Long
|
||||
TIED10MONT LLN0$CF$SenNum$maxVal "string" type=Long
|
||||
TIED10MONT LLN0$CF$SenNum$stepSize "string" type=Ulong
|
||||
TIED10MONT LLN0$DC$NamPlt$vendor "string" type=Vstring255
|
||||
TIED10MONT LLN0$DC$NamPlt$swRev "string" type=Vstring255
|
||||
TIED10MONT LLN0$DC$NamPlt$d "string" type=Vstring255
|
||||
TIED10MONT LLN0$DC$NamPlt$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT LLN0$DC$NamPlt$configRev "string" type=Vstring255
|
||||
TIED10MONT LLN0$DC$SenNum$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT LLN0$SP$SenNum$setVal "string" type=Long
|
||||
TIED10MONT LLN0$EX$NamPlt$ldNs "string" type=Vstring255
|
||||
TIED10MONT LLN0$EX$SenNum$dataNs "string" type=Vstring255
|
||||
TIED10MONT LPHD1$ST$PhyHealth$stVal "string" type=Byte
|
||||
TIED10MONT LPHD1$ST$PhyHealth$q "string" type=BVstring13
|
||||
TIED10MONT LPHD1$ST$PhyHealth$t "string" type=Utctime
|
||||
TIED10MONT LPHD1$ST$OutOv$stVal "string" type=Bool
|
||||
TIED10MONT LPHD1$ST$OutOv$q "string" type=BVstring13
|
||||
TIED10MONT LPHD1$ST$OutOv$t "string" type=Utctime
|
||||
TIED10MONT LPHD1$ST$Proxy$stVal "string" type=Bool
|
||||
TIED10MONT LPHD1$ST$Proxy$q "string" type=BVstring13
|
||||
TIED10MONT LPHD1$ST$Proxy$t "string" type=Utctime
|
||||
TIED10MONT LPHD1$CF$SntpAddr$minVal "string" type=Long
|
||||
TIED10MONT LPHD1$CF$SntpAddr$maxVal "string" type=Long
|
||||
TIED10MONT LPHD1$CF$SntpAddr$stepSize "string" type=Ulong
|
||||
TIED10MONT LPHD1$CF$TimeZone$minVal "string" type=Long
|
||||
TIED10MONT LPHD1$CF$TimeZone$maxVal "string" type=Long
|
||||
TIED10MONT LPHD1$CF$TimeZone$stepSize "string" type=Ulong
|
||||
TIED10MONT LPHD1$DC$PhyNam$vendor "string" type=Vstring255
|
||||
TIED10MONT LPHD1$DC$PhyNam$hwRev "string" type=Vstring255
|
||||
TIED10MONT LPHD1$DC$PhyNam$swRev "string" type=Vstring255
|
||||
TIED10MONT LPHD1$DC$PhyNam$serNum "string" type=Vstring255
|
||||
TIED10MONT LPHD1$DC$PhyNam$model "string" type=Vstring255
|
||||
TIED10MONT LPHD1$DC$PhyNam$location "string" type=Vstring255
|
||||
TIED10MONT LPHD1$DC$OutOv$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT LPHD1$DC$Proxy$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT LPHD1$DC$SntpAddr$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT LPHD1$DC$TimeZone$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT LPHD1$SP$SntpAddr$setVal "string" type=Long
|
||||
TIED10MONT LPHD1$SP$TimeZone$setVal "string" type=Long
|
||||
TIED10MONT LPHD1$SV$OutOv$subEna "string" type=Bool
|
||||
TIED10MONT LPHD1$SV$OutOv$subVal "string" type=Bool
|
||||
TIED10MONT LPHD1$SV$OutOv$subQ "string" type=BVstring13
|
||||
TIED10MONT LPHD1$SV$OutOv$subID "string" type=Vstring64
|
||||
TIED10MONT LPHD1$SV$Proxy$subEna "string" type=Bool
|
||||
TIED10MONT LPHD1$SV$Proxy$subVal "string" type=Bool
|
||||
TIED10MONT LPHD1$SV$Proxy$subQ "string" type=BVstring13
|
||||
TIED10MONT LPHD1$SV$Proxy$subID "string" type=Vstring64
|
||||
TIED10MONT LPHD1$EX$SntpAddr$dataNs "string" type=Vstring255
|
||||
TIED10MONT LPHD1$EX$TimeZone$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$MX$Tmp$mag$f "0.0.10.0" type=Float
|
||||
TIED10MONT SIML01$MX$Tmp$q "0.0.10.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$Tmp$t "0.0.10.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$H2$mag$f "0.0.0.0" type=Float
|
||||
TIED10MONT SIML01$MX$H2$q "0.0.0.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$H2$t "0.0.0.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$CO$mag$f "0.0.1.0" type=Float
|
||||
TIED10MONT SIML01$MX$CO$q "0.0.1.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$CO$t "0.0.1.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$CH4$mag$f "0.0.2.0" type=Float
|
||||
TIED10MONT SIML01$MX$CH4$q "0.0.2.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$CH4$t "0.0.2.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$C2H4$mag$f "0.0.3.0" type=Float
|
||||
TIED10MONT SIML01$MX$C2H4$q "0.0.3.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$C2H4$t "0.0.3.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$C2H6$mag$f "0.0.4.0" type=Float
|
||||
TIED10MONT SIML01$MX$C2H6$q "0.0.4.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$C2H6$t "0.0.4.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$C2H2$mag$f "0.0.5.0" type=Float
|
||||
TIED10MONT SIML01$MX$C2H2$q "0.0.5.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$C2H2$t "0.0.5.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$TotHyd$mag$f "0.0.6.0" type=Float
|
||||
TIED10MONT SIML01$MX$TotHyd$q "0.0.6.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$TotHyd$t "0.0.6.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$SmpTm$mag$i "0.0.7.0" type=Long
|
||||
TIED10MONT SIML01$MX$SmpTm$q "0.0.7.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$SmpTm$t "0.0.7.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$CO2$mag$f "0.0.8.0" type=Float
|
||||
TIED10MONT SIML01$MX$CO2$q "0.0.8.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$CO2$t "0.0.8.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$MicrWat$mag$f "0.0.9.0" type=Float
|
||||
TIED10MONT SIML01$MX$MicrWat$q "0.0.9.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$MicrWat$t "0.0.9.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$GasPres$mag$f "0.0.11.0" type=Float
|
||||
TIED10MONT SIML01$MX$GasPres$q "0.0.11.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$GasPres$t "0.0.11.2" type=Utctime
|
||||
TIED10MONT SIML01$MX$GasBot$mag$i "0.0.12.0" type=Long
|
||||
TIED10MONT SIML01$MX$GasBot$q "0.0.12.1" type=BVstring13
|
||||
TIED10MONT SIML01$MX$GasBot$t "0.0.12.2" type=Utctime
|
||||
TIED10MONT SIML01$ST$Mod$stVal "string" type=Byte
|
||||
TIED10MONT SIML01$ST$Mod$q "string" type=BVstring13
|
||||
TIED10MONT SIML01$ST$Mod$t "string" type=Utctime
|
||||
TIED10MONT SIML01$ST$Beh$q "string" type=BVstring13
|
||||
TIED10MONT SIML01$ST$Beh$t "string" type=Utctime
|
||||
TIED10MONT SIML01$ST$Health$stVal "string" type=Byte
|
||||
TIED10MONT SIML01$ST$Health$q "string" type=BVstring13
|
||||
TIED10MONT SIML01$ST$Health$t "string" type=Utctime
|
||||
TIED10MONT SIML01$ST$InsAlm$stVal "string" type=Bool
|
||||
TIED10MONT SIML01$ST$InsAlm$q "string" type=BVstring13
|
||||
TIED10MONT SIML01$ST$InsAlm$t "string" type=Utctime
|
||||
TIED10MONT SIML01$ST$MoDevConf$stVal "0.0.13.0" type=Bool
|
||||
TIED10MONT SIML01$ST$MoDevConf$q "0.0.13.1" type=BVstring13
|
||||
TIED10MONT SIML01$ST$MoDevConf$t "0.0.13.2" type=Utctime
|
||||
TIED10MONT SIML01$ST$SupDevRun$stVal "0.0.14.0" type=Bool
|
||||
TIED10MONT SIML01$ST$SupDevRun$q "0.0.14.1" type=BVstring13
|
||||
TIED10MONT SIML01$ST$SupDevRun$t "0.0.14.2" type=Utctime
|
||||
TIED10MONT SIML01$ST$GasUnPresAlm$stVal "0.0.15.0" type=Bool
|
||||
TIED10MONT SIML01$ST$GasUnPresAlm$q "0.0.15.1" type=BVstring13
|
||||
TIED10MONT SIML01$ST$GasUnPresAlm$t "0.0.15.2" type=Utctime
|
||||
TIED10MONT SIML01$ST$GasLowPresAlm$stVal "0.0.16.0" type=Bool
|
||||
TIED10MONT SIML01$ST$GasLowPresAlm$q "0.0.16.1" type=BVstring13
|
||||
TIED10MONT SIML01$ST$GasLowPresAlm$t "0.0.16.2" type=Utctime
|
||||
TIED10MONT SIML01$ST$ActCyGasSta$stVal "0.0.17.0" type=Bool
|
||||
TIED10MONT SIML01$ST$ActCyGasSta$q "0.0.17.1" type=BVstring13
|
||||
TIED10MONT SIML01$ST$ActCyGasSta$t "0.0.17.2" type=Utctime
|
||||
TIED10MONT SIML01$CF$Mod$ctlModel "string" type=Byte
|
||||
TIED10MONT SIML01$CF$Tmp$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$Tmp$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$Tmp$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$Tmp$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$Tmp$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$Tmp$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$Tmp$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$Tmp$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$Tmp$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$Tmp$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$Tmp$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$Tmp$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$Tmp$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$H2$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$H2$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$H2$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$H2$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$H2$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$H2$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$H2$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$H2$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$H2$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$H2$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$H2$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$H2$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$H2$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$CO$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$CO$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$CO$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$CO$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$CO$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$CH4$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$CH4$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$CH4$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$CH4$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$CH4$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$CH4$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$CH4$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CH4$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CH4$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CH4$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CH4$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CH4$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CH4$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$C2H4$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$C2H4$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$C2H4$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$C2H4$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$C2H4$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H4$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H4$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H4$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H4$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H4$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H4$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H4$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H4$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$C2H6$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$C2H6$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$C2H6$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$C2H6$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$C2H6$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H6$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H6$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H6$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H6$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H6$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H6$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H6$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H6$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$C2H2$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$C2H2$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$C2H2$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$C2H2$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$C2H2$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H2$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H2$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H2$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H2$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H2$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H2$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H2$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$C2H2$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$TotHyd$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$TotHyd$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$TotHyd$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$TotHyd$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$TotHyd$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$TotHyd$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$TotHyd$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$TotHyd$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$TotHyd$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$TotHyd$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$TotHyd$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$TotHyd$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$TotHyd$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$SmpTm$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$SmpTm$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$SmpTm$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$SmpTm$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$SmpTm$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$SmpTm$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$SmpTm$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$SmpTm$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$SmpTm$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$SmpTm$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$SmpTm$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$SmpTm$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$SmpTm$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$CO2$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$CO2$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$CO2$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$CO2$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$CO2$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO2$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO2$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO2$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO2$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO2$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO2$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO2$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$CO2$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$MicrWat$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$MicrWat$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$MicrWat$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$MicrWat$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$MicrWat$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$MicrWat$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$MicrWat$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$MicrWat$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$MicrWat$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$MicrWat$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$MicrWat$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$MicrWat$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$MicrWat$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$GasPres$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$GasPres$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$GasPres$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$GasPres$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$GasPres$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasPres$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasPres$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasPres$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasPres$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasPres$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasPres$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasPres$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasPres$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$GasBot$units$SIUnit "string" type=Byte
|
||||
TIED10MONT SIML01$CF$GasBot$units$multiplier "string" type=Byte
|
||||
TIED10MONT SIML01$CF$GasBot$db "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$GasBot$zeroDb "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$GasBot$sVC$scaleFactor "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasBot$sVC$offset "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasBot$rangeC$hhLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasBot$rangeC$hLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasBot$rangeC$lLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasBot$rangeC$llLim$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasBot$rangeC$min$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasBot$rangeC$max$f "string" type=Float
|
||||
TIED10MONT SIML01$CF$GasBot$smpRate "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$SamInteC$minVal "string" type=Long
|
||||
TIED10MONT SIML01$CF$SamInteC$maxVal "string" type=Long
|
||||
TIED10MONT SIML01$CF$SamInteC$stepSize "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$StartWork$minVal "string" type=Long
|
||||
TIED10MONT SIML01$CF$StartWork$maxVal "string" type=Long
|
||||
TIED10MONT SIML01$CF$StartWork$stepSize "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$NextWorkTime$minVal "string" type=Long
|
||||
TIED10MONT SIML01$CF$NextWorkTime$maxVal "string" type=Long
|
||||
TIED10MONT SIML01$CF$NextWorkTime$stepSize "string" type=Ulong
|
||||
TIED10MONT SIML01$CF$ReStart$minVal "string" type=Long
|
||||
TIED10MONT SIML01$CF$ReStart$maxVal "string" type=Long
|
||||
TIED10MONT SIML01$CF$ReStart$stepSize "string" type=Ulong
|
||||
TIED10MONT SIML01$DC$NamPlt$vendor "string" type=Vstring255
|
||||
TIED10MONT SIML01$DC$NamPlt$swRev "string" type=Vstring255
|
||||
TIED10MONT SIML01$DC$NamPlt$d "string" type=Vstring255
|
||||
TIED10MONT SIML01$DC$NamPlt$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$NamPlt$configRev "string" type=Vstring255
|
||||
TIED10MONT SIML01$DC$Tmp$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$H2$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$CO$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$CH4$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$C2H4$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$C2H6$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$C2H2$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$TotHyd$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$SmpTm$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$CO2$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$MicrWat$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$GasPres$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$GasBot$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$InsAlm$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$MoDevConf$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$SupDevRun$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$GasUnPresAlm$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$GasLowPresAlm$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$ActCyGasSta$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$SamInteC$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$StartWork$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$NextWorkTime$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$DC$ReStart$dU "string" type=UTF8Vstring255
|
||||
TIED10MONT SIML01$SG$SamInteC$setVal "string" type=Long
|
||||
TIED10MONT SIML01$SG$StartWork$setVal "string" type=Long
|
||||
TIED10MONT SIML01$SG$NextWorkTime$setVal "string" type=Long
|
||||
TIED10MONT SIML01$SG$ReStart$setVal "string" type=Long
|
||||
TIED10MONT SIML01$SV$Tmp$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$Tmp$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$Tmp$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$Tmp$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$H2$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$H2$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$H2$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$H2$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$CO$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$CO$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$CO$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$CO$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$CH4$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$CH4$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$CH4$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$CH4$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$C2H4$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$C2H4$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$C2H4$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$C2H4$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$C2H6$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$C2H6$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$C2H6$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$C2H6$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$C2H2$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$C2H2$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$C2H2$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$C2H2$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$TotHyd$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$TotHyd$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$TotHyd$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$TotHyd$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$SmpTm$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$SmpTm$subMag$i "string" type=Long
|
||||
TIED10MONT SIML01$SV$SmpTm$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$SmpTm$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$CO2$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$CO2$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$CO2$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$CO2$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$MicrWat$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$MicrWat$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$MicrWat$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$MicrWat$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$GasPres$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$GasPres$subMag$f "string" type=Float
|
||||
TIED10MONT SIML01$SV$GasPres$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$GasPres$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$GasBot$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$GasBot$subMag$i "string" type=Long
|
||||
TIED10MONT SIML01$SV$GasBot$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$GasBot$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$InsAlm$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$InsAlm$subVal "string" type=Bool
|
||||
TIED10MONT SIML01$SV$InsAlm$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$InsAlm$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$MoDevConf$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$MoDevConf$subVal "string" type=Bool
|
||||
TIED10MONT SIML01$SV$MoDevConf$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$MoDevConf$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$SupDevRun$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$SupDevRun$subVal "string" type=Bool
|
||||
TIED10MONT SIML01$SV$SupDevRun$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$SupDevRun$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$GasUnPresAlm$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$GasUnPresAlm$subVal "string" type=Bool
|
||||
TIED10MONT SIML01$SV$GasUnPresAlm$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$GasUnPresAlm$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$GasLowPresAlm$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$GasLowPresAlm$subVal "string" type=Bool
|
||||
TIED10MONT SIML01$SV$GasLowPresAlm$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$GasLowPresAlm$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SV$ActCyGasSta$subEna "string" type=Bool
|
||||
TIED10MONT SIML01$SV$ActCyGasSta$subVal "string" type=Bool
|
||||
TIED10MONT SIML01$SV$ActCyGasSta$subQ "string" type=BVstring13
|
||||
TIED10MONT SIML01$SV$ActCyGasSta$subID "string" type=Vstring64
|
||||
TIED10MONT SIML01$SE$SamInteC$setVal "string" type=Long
|
||||
TIED10MONT SIML01$SE$StartWork$setVal "string" type=Long
|
||||
TIED10MONT SIML01$SE$NextWorkTime$setVal "string" type=Long
|
||||
TIED10MONT SIML01$SE$ReStart$setVal "string" type=Long
|
||||
TIED10MONT SIML01$EX$NamPlt$ldNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$CO$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$CH4$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$C2H4$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$C2H6$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$C2H2$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$TotHyd$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$SmpTm$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$CO2$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$MicrWat$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$GasPres$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$GasBot$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$MoDevConf$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$SupDevRun$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$GasUnPresAlm$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$GasLowPresAlm$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$ActCyGasSta$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$SamInteC$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$StartWork$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$NextWorkTime$dataNs "string" type=Vstring255
|
||||
TIED10MONT SIML01$EX$ReStart$dataNs "string" type=Vstring255
|
@ -0,0 +1,2 @@
|
||||
<Leafmap>
|
||||
</Leafmap>
|
@ -0,0 +1,63 @@
|
||||
<!-- edited with XML Spy v4.0.1 U (http://www.xmlspy.com) by Michael Eick (SISCO/Engineering) -->
|
||||
<!--
|
||||
01/11/12 JRB Add functions for Edition 2.
|
||||
Del UCA functions mvlu_rbepd_rd_ind_fun, mvlu_rbepd_wr_ind_fun, mvlu_trgs_rd_ind_fun, and mvlu_trgs_wr_ind_fun
|
||||
(not needed for IEC 61850)
|
||||
09/29/11 JRB Added mvl61850_lcb_*.
|
||||
03/23/11 JRB Added lln0_health_*.
|
||||
08/29/07 JRB Added mvlu_sqnum_wr_ind_fun for UCA/ODF support
|
||||
07/10/07 CRM Added mvlu_rbepd_rd_ind_fun, mvlu_rbepd_wr_ind_fun, mvlu_trgs_rd_ind_fun, and mvlu_trgs_wr_ind_fun
|
||||
04/05/06 JRB Add mvl61850_datset_wr_ind
|
||||
09/16/05 JRB Add u_ctl_sbow_comp_wr_ind
|
||||
05/05/05 JRB Del mvlu_sqnum_int16u_wr_ind_fun used for "brcbXX$SqNum" (61850 says not writable).
|
||||
Del mvlu_sqnum_wr_ind_fun used for "urcbXX$SqNum" (61850 says not writable).
|
||||
12/10/04 JRB Replace mvl61850_sbo_select_rd_ind with u_ctl_sbo_rd_ind.
|
||||
Replace u_sbo_*, u_direct_* with u_ctl_*.
|
||||
Add mvl61850_beh_stval_rd_ind.
|
||||
09/20/04 JRB Add "mvl61850_select_rd_ind", u_sbo_*, u_direct_*, u_cancel_*.
|
||||
07/01/04 JRB New file for application configured with SCL.
|
||||
-->
|
||||
<Leafmap>
|
||||
<Leaf Name="$dynamic" RdIndFun="u_custom_rd_ind" WrIndFun="u_custom_wr_ind" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="u_ctl_sbo_rd_ind" WrIndFun="u_no_write_allowed" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="u_custom_rd_ind" WrIndFun="u_ctl_sbow_comp_wr_ind" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="mvl61850_beh_stval_rd_ind" WrIndFun="u_no_write_allowed" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="lln0_health_stval_rd_ind" WrIndFun="u_no_write_allowed" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="lln0_health_q_rd_ind" WrIndFun="u_no_write_allowed" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="lln0_health_t_rd_ind" WrIndFun="u_no_write_allowed" Ref=""/>
|
||||
|
||||
<!-- Use same RdIndFun so no new read functions needed -->
|
||||
<Leaf Name="$dynamic" RdIndFun="u_custom_rd_ind" WrIndFun="u_ctl_oper_ctlval_wr_ind" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="u_custom_rd_ind" WrIndFun="u_ctl_oper_other_wr_ind" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="u_custom_rd_ind" WrIndFun="u_cancel_comp_wr_ind" Ref=""/>
|
||||
<!--
|
||||
These required for dynamically created BRCB and URCB (e.g. created from SCL).
|
||||
-->
|
||||
<Leaf Name="$dynamic" RdIndFun="mvlu_rptena_rd_ind_fun" WrIndFun="mvlu_rptena_wr_ind_fun" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="mvlu_rptid_rd_ind_fun" WrIndFun="mvlu_rptid_wr_ind_fun" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="mvlu_datsetna_rd_ind_fun" WrIndFun="mvl61850_datset_wr_ind" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="mvlu_confrev_rd_ind" WrIndFun="u_no_write_allowed" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="mvlu_optflds_rd_ind_fun" WrIndFun="mvlu_optflds_wr_ind_fun" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="mvlu_buftim_rd_ind_fun" WrIndFun="mvlu_buftim_wr_ind_fun" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="mvlu_sqnum_rd_ind_fun" WrIndFun="mvlu_sqnum_wr_ind_fun" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="mvlu_sqnum_int16u_rd_ind_fun" WrIndFun="u_no_write_allowed" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="mvlu_trgops_rd_ind_fun" WrIndFun="mvlu_trgops_wr_ind_fun" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="mvlu_intgpd_rd_ind_fun" WrIndFun="mvlu_intgpd_wr_ind_fun" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="mvlu_gi_rd_ind" WrIndFun="mvlu_gi_wr_ind" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="mvlu_purgebuf_rd_ind" WrIndFun="mvlu_purgebuf_wr_ind" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="mvlu_entryid_rd_ind" WrIndFun="mvlu_entryid_wr_ind" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="mvlu_timeofentry_rd_ind" WrIndFun="u_no_write_allowed" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="mvlu_resv_rd_ind_fun" WrIndFun="mvlu_resv_wr_ind_fun" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="u_custom_rd_ind" WrIndFun="mvl61850_lcb_logena_wr_ind" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="u_custom_rd_ind" WrIndFun="mvl61850_lcb_datset_wr_ind" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="u_custom_rd_ind" WrIndFun="mvl61850_lcb_other_wr_ind" Ref=""/>
|
||||
<!-- Functions for Edition 2 RCB ResvTms, Owner. -->
|
||||
<Leaf Name="$dynamic" RdIndFun="mvl61850_brcb_resvtms_rd_ind" WrIndFun="mvl61850_brcb_resvtms_wr_ind" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="mvl61850_owner_rd_ind" WrIndFun="u_no_write_allowed" Ref=""/>
|
||||
<!-- Functions for Edition 2 RCB LGOS. -->
|
||||
<Leaf Name="$dynamic" RdIndFun="u_LGOS_NdsCom_rd_ind" WrIndFun="u_no_write_allowed" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="u_LGOS_LastStNum_rd_ind" WrIndFun="u_no_write_allowed" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="u_LGOS_St_rd_ind" WrIndFun="u_no_write_allowed" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="u_LGOS_SimSt_rd_ind" WrIndFun="u_no_write_allowed" Ref=""/>
|
||||
<Leaf Name="$dynamic" RdIndFun="u_LGOS_ConfRevNum_rd_ind" WrIndFun="u_no_write_allowed" Ref=""/>
|
||||
</Leafmap>
|
@ -0,0 +1,192 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<LOG_CFG>
|
||||
<!--
|
||||
**************************************************************************
|
||||
* SISCO MODULE HEADER ****************************************************
|
||||
**************************************************************************
|
||||
* (c) Copyright Systems Integration Specialists Company, Inc., *
|
||||
* 2001-2008, All Rights Reserved *
|
||||
* *
|
||||
* MODULE NAME : LogCfg.xml *
|
||||
* PRODUCT(S) : *
|
||||
* *
|
||||
* MODULE DESCRIPTION : Logging Configuration File *
|
||||
* *
|
||||
* This file is used to set the log masks used to control logging *
|
||||
* performed by the Product's Debug Libraries. *
|
||||
* This module is read by the source module 'logcfgx.c'. *
|
||||
* *
|
||||
**************************************************************************
|
||||
-->
|
||||
<LogControl>
|
||||
<LogCommon>
|
||||
<LogElapsedTime>Off</LogElapsedTime>
|
||||
</LogCommon>
|
||||
<LogFileAttributes>
|
||||
<LogFileEnable>On</LogFileEnable>
|
||||
<LogFileName>mms.log</LogFileName>
|
||||
<LogFileSize>1000000</LogFileSize>
|
||||
<DestroyOldFile>Off</DestroyOldFile>
|
||||
<HardFlush>Off</HardFlush>
|
||||
</LogFileAttributes>
|
||||
<LogIpcAttributes>
|
||||
<LogIpcAppId>MMS-LITE-80X-001 SCL_SRVR</LogIpcAppId>
|
||||
<LogIpcMaxQueCount>10</LogIpcMaxQueCount>
|
||||
<LogIpcListenEnable>Off</LogIpcListenEnable>
|
||||
<LogIpcListenPort>55200</LogIpcListenPort>
|
||||
<LogIpcNumListenPorts>1</LogIpcNumListenPorts>
|
||||
<LogIpcMaxListenConn>1</LogIpcMaxListenConn>
|
||||
<LogIpcCallEnable>On</LogIpcCallEnable>
|
||||
<LogIpcCallingPort>55146</LogIpcCallingPort>
|
||||
<LogIpcCallingIp>127.0.0.1</LogIpcCallingIp>
|
||||
<LogIpcCallingBackoff>500</LogIpcCallingBackoff>
|
||||
<LogIpcSmartMode>On</LogIpcSmartMode>
|
||||
<LogIpcEditLogCfg>On</LogIpcEditLogCfg>
|
||||
<LogIpcSealMode>2</LogIpcSealMode>
|
||||
<LogIpcSealTimeWindow>10</LogIpcSealTimeWindow>
|
||||
</LogIpcAttributes>
|
||||
</LogControl>
|
||||
<LogMasks>
|
||||
<!-- Application Specific Log Masks -->
|
||||
<LogConfigurationMasks>
|
||||
<LOGCFG_NERR>On</LOGCFG_NERR>
|
||||
<LOGCFG_FLOW>Off</LOGCFG_FLOW>
|
||||
</LogConfigurationMasks>
|
||||
<UserLogMasks>
|
||||
<USER_LOG_CLIENT>Off</USER_LOG_CLIENT>
|
||||
<USER_LOG_SERVER>Off</USER_LOG_SERVER>
|
||||
</UserLogMasks>
|
||||
<SecurityLogMasks>
|
||||
<SEC_LOG_NERR>On</SEC_LOG_NERR>
|
||||
<SEC_LOG_FLOW>Off</SEC_LOG_FLOW>
|
||||
<SEC_LOG_DATA>Off</SEC_LOG_DATA>
|
||||
<SEC_LOG_DEBUG>Off</SEC_LOG_DEBUG>
|
||||
<SSLE_LOG_NERR>On</SSLE_LOG_NERR>
|
||||
<SSLE_LOG_FLOW>Off</SSLE_LOG_FLOW>
|
||||
<SSLE_LOG_DATA>Off</SSLE_LOG_DATA>
|
||||
<SSLE_LOG_DEBUG>Off</SSLE_LOG_DEBUG>
|
||||
</SecurityLogMasks>
|
||||
<SemaphoreLogMasks>
|
||||
<GS_LOG_NERR>On</GS_LOG_NERR>
|
||||
<GS_LOG_FLOW>Off</GS_LOG_FLOW>
|
||||
</SemaphoreLogMasks>
|
||||
<Asn1LogMasks>
|
||||
<ASN1_LOG_NERR>On</ASN1_LOG_NERR>
|
||||
<ASN1_LOG_DEC>Off</ASN1_LOG_DEC>
|
||||
<ASN1_LOG_ENC>Off</ASN1_LOG_ENC>
|
||||
</Asn1LogMasks>
|
||||
<MmsLogMasks>
|
||||
<MMS_LOG_NERR>On</MMS_LOG_NERR>
|
||||
<MMS_LOG_CLIENT>Off</MMS_LOG_CLIENT>
|
||||
<MMS_LOG_SERVER>Off</MMS_LOG_SERVER>
|
||||
<MMS_LOG_DEC>Off</MMS_LOG_DEC>
|
||||
<MMS_LOG_ENC>Off</MMS_LOG_ENC>
|
||||
<MMS_LOG_RT>Off</MMS_LOG_RT>
|
||||
<MMS_LOG_RTAA>Off</MMS_LOG_RTAA>
|
||||
<MMS_LOG_AA>Off</MMS_LOG_AA>
|
||||
</MmsLogMasks>
|
||||
<MvlLogMasks>
|
||||
<MVLLOG_NERR>On</MVLLOG_NERR>
|
||||
<MVLLOG_ACSE>Off</MVLLOG_ACSE>
|
||||
<MVLLOG_ACSEDATA>Off</MVLLOG_ACSEDATA>
|
||||
<MVLULOG_FLOW>Off</MVLULOG_FLOW>
|
||||
<MVLULOG_DEBUG>Off</MVLULOG_DEBUG>
|
||||
</MvlLogMasks>
|
||||
<AcseLogMasks>
|
||||
<ACSE_LOG_ENC>Off</ACSE_LOG_ENC>
|
||||
<ACSE_LOG_DEC>Off</ACSE_LOG_DEC>
|
||||
<COPP_LOG_DEC>Off</COPP_LOG_DEC>
|
||||
<COPP_LOG_DEC_HEX>Off</COPP_LOG_DEC_HEX>
|
||||
<COPP_LOG_ENC>Off</COPP_LOG_ENC>
|
||||
<COPP_LOG_ENC_HEX>Off</COPP_LOG_ENC_HEX>
|
||||
<COSP_LOG_DEC>Off</COSP_LOG_DEC>
|
||||
<COSP_LOG_DEC_HEX>Off</COSP_LOG_DEC_HEX>
|
||||
<COSP_LOG_ENC>Off</COSP_LOG_ENC>
|
||||
<COSP_LOG_ENC_HEX>Off</COSP_LOG_ENC_HEX>
|
||||
</AcseLogMasks>
|
||||
<Tp4LogMasks>
|
||||
<TP4_LOG_FLOWUP>Off</TP4_LOG_FLOWUP>
|
||||
<TP4_LOG_FLOWDOWN>Off</TP4_LOG_FLOWDOWN>
|
||||
</Tp4LogMasks>
|
||||
<ClnpLogMasks>
|
||||
<CLNP_LOG_NERR>On</CLNP_LOG_NERR>
|
||||
<CLNP_LOG_REQ>Off</CLNP_LOG_REQ>
|
||||
<CLNP_LOG_IND>Off</CLNP_LOG_IND>
|
||||
<CLSNS_LOG_REQ>Off</CLSNS_LOG_REQ>
|
||||
<CLSNS_LOG_IND>Off</CLSNS_LOG_IND>
|
||||
</ClnpLogMasks>
|
||||
<SxLogMasks>
|
||||
<SX_LOG_NERR>On</SX_LOG_NERR>
|
||||
<SX_LOG_DEC>Off</SX_LOG_DEC>
|
||||
<SX_LOG_ENC>Off</SX_LOG_ENC>
|
||||
<SX_LOG_FLOW>Off</SX_LOG_FLOW>
|
||||
<SX_LOG_DEBUG>Off</SX_LOG_DEBUG>
|
||||
</SxLogMasks>
|
||||
<SocketLogMasks>
|
||||
<!-- gensock2 logging -->
|
||||
<SOCK_LOG_NERR>On</SOCK_LOG_NERR>
|
||||
<SOCK_LOG_FLOW>Off</SOCK_LOG_FLOW>
|
||||
<SOCK_LOG_TX>Off</SOCK_LOG_TX>
|
||||
<SOCK_LOG_RX>Off</SOCK_LOG_RX>
|
||||
</SocketLogMasks>
|
||||
<SmpLogMasks>
|
||||
<SMP_LOG_REQ>Off</SMP_LOG_REQ>
|
||||
<SMP_LOG_IND>Off</SMP_LOG_IND>
|
||||
</SmpLogMasks>
|
||||
<MemLogMasks>
|
||||
<MEM_LOG_CALLOC>Off</MEM_LOG_CALLOC>
|
||||
<MEM_LOG_MALLOC>Off</MEM_LOG_MALLOC>
|
||||
<MEM_LOG_REALLOC>Off</MEM_LOG_REALLOC>
|
||||
<MEM_LOG_FREE>Off</MEM_LOG_FREE>
|
||||
</MemLogMasks>
|
||||
</LogMasks>
|
||||
<!--
|
||||
*********************************************************************************
|
||||
*
|
||||
***** Log Common
|
||||
*
|
||||
* LogElapsedTime * Windows only feature
|
||||
* ON = provides high resolution elapsed time format
|
||||
* OFF = standard time format
|
||||
*
|
||||
***** Log File Attributes
|
||||
*
|
||||
* LogFileEnable * Log to a file - ON/OFF
|
||||
* LogFileName * log file name, may include path
|
||||
* LogFileSize * log file size in bytes
|
||||
* DestroyOldFile * ON = destroy existing log file
|
||||
* OFF = append to existing log file
|
||||
* HardFlush * close and reopen log file each time a message
|
||||
* is logged - ON/OFF
|
||||
*
|
||||
* LogFileName and LogFileSize are application specific
|
||||
*
|
||||
***** IPC Logging Attributes
|
||||
*
|
||||
* LogIpcAppId * Application name
|
||||
* LogIpcMaxQueCount * Max number of log messages queued for send
|
||||
* LogIpcListenEnable * Enables logging through a specific port - ON/OFF
|
||||
* LogIpcListenPort * Listen base port (see slog.h for SISCO used ports)
|
||||
* LogIpcNumListenPorts * Range of ports for multiple applications to share
|
||||
* LogIpcMaxListenConn * Max number of socket connections to accept per port
|
||||
*
|
||||
* LogIpcAppId, LogIpcListenEnable, LogIpcListenPort and LogIpcSmartMode
|
||||
* are application specific
|
||||
*
|
||||
***** IPC Logging Attributes for Log Viewer
|
||||
*
|
||||
* LogIpcCallEnable * Initiate connection to Log Viewer
|
||||
* LogIpcCallingPort * Log Viewer calling port
|
||||
* LogIpcCallingIp * Log Viewer IP address
|
||||
* LogIpcCallingBackoff * ms to wait before retrying connection
|
||||
* LogIpcSmartMode * In smart mode Log Viewer can issue START/STOP logging
|
||||
* and use other enhanced capabilities (recommended)
|
||||
* LogIpcEditLogCfg * Allow editing of "logcfg.xml" by Log Viewer
|
||||
*
|
||||
***** Log Masks
|
||||
*
|
||||
* Log masks are are application specific
|
||||
*
|
||||
*********************************************************************************
|
||||
-->
|
||||
</LOG_CFG>
|
@ -0,0 +1,307 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- edited with XML Spy v4.0 (http://www.xmlspy.com) (SISCO/Engineering) -->
|
||||
|
||||
<!-- ****************************************************************** -->
|
||||
<!-- * SISCO MODULE HEADER ******************************************** -->
|
||||
<!-- ****************************************************************** -->
|
||||
<!-- * (c) Copyright Systems Integration Specialists Company, Inc., -->
|
||||
<!-- * 2001 - 2005, All Rights Reserved -->
|
||||
<!-- * -->
|
||||
<!-- * MODULE NAME : osicfg.xml -->
|
||||
<!-- * PRODUCT(S) : MMSEASE-Lite -->
|
||||
<!-- * -->
|
||||
<!-- * MODULE DESCRIPTION : Configuration File for Lean-T Stack -->
|
||||
<!-- * -->
|
||||
<!-- * This file is used to set the log masks used to control -->
|
||||
<!-- * logging performed by the MMS-EASE Lite Debug Libraries, -->
|
||||
<!-- * as well as to set memory debug flags. This module is -->
|
||||
<!-- * read by the source module 'osicfgx.c'. -->
|
||||
<!-- * -->
|
||||
<!-- * MODULE DESCRIPTION : -->
|
||||
<!-- * -->
|
||||
<!-- * Configuration file for Lean-T Stack -->
|
||||
<!-- * -->
|
||||
<!-- * The configuration file has three sections. -->
|
||||
<!-- * The order of sections in the configuration file is relevant: -->
|
||||
<!-- * -->
|
||||
<!-- * Network -->
|
||||
<!-- * -->
|
||||
<!-- * Transport This section may be empty (default -->
|
||||
<!-- * parameters will be used). -->
|
||||
<!-- * -->
|
||||
<!-- * Addressing This section should be present to -->
|
||||
<!-- * properly terminate parsing of cfg file. -->
|
||||
<!-- * -->
|
||||
<!-- * Note: Most parameters are optional unless stated that -->
|
||||
<!-- * they are mandatory. If an optional parameter is -->
|
||||
<!-- * not configured in this file a default value will -->
|
||||
<!-- * be used. -->
|
||||
<!-- * -->
|
||||
<!-- * MODIFICATION LOG : -->
|
||||
<!-- * Date Who Rev Comments -->
|
||||
<!-- * ======= ===== === ========================== -->
|
||||
<!-- * 03/26/08 GLB 04 Removed: Max_Num_Connections and -->
|
||||
<!-- Rfc1006_Max_Num_Conns -->
|
||||
<!-- * 09/07/05 EJV 03 Commented out DTD and Schema references -->
|
||||
<!-- * EJV Added Rfc1006_Max_Spdu_Outstanding -->
|
||||
<!-- * 11/05/01 GLB 02 Added MMS section -->
|
||||
<!-- * 08/31/00 GLB 01 Module created from existing lean.cfg -->
|
||||
<!-- ****************************************************************** -->
|
||||
<!--
|
||||
#############################################################################
|
||||
# NOTE: Descriptions of parameters are at the bottom of this module.
|
||||
###########################################################################-->
|
||||
|
||||
<!-- Uncomment to use DTD / Schema
|
||||
<!DOCTYPE STACK_CFG SYSTEM "..\osicfg.dtd">
|
||||
<STACK_CFG xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="..\osicfg.xsd">
|
||||
-->
|
||||
|
||||
<STACK_CFG>
|
||||
<MMS>
|
||||
<!-- DEBUG: use 400 to test segmenting of reports
|
||||
<Max_Mms_Pdu_Length>400</Max_Mms_Pdu_Length>
|
||||
<Max_Mms_Pdu_Length>32000</Max_Mms_Pdu_Length>
|
||||
-->
|
||||
<Max_Mms_Pdu_Length>120000</Max_Mms_Pdu_Length>
|
||||
<Max_Calling_Connections>0</Max_Calling_Connections>
|
||||
<Max_Called_Connections>12</Max_Called_Connections>
|
||||
</MMS>
|
||||
<Network>
|
||||
<Clnp>
|
||||
<Lifetime>12</Lifetime>
|
||||
<Lifetime_Decrement>1</Lifetime_Decrement>
|
||||
<Cfg_Timer>120</Cfg_Timer>
|
||||
<Esh_Delay>5</Esh_Delay>
|
||||
<Local_NSAP>49 00 01 53 49 53 43 21 00 01</Local_NSAP>
|
||||
</Clnp>
|
||||
</Network>
|
||||
<Transport>
|
||||
<Tp4>
|
||||
<Max_Tpdu_Length>1024</Max_Tpdu_Length>
|
||||
<Max_Remote_Cdt>4</Max_Remote_Cdt>
|
||||
<Local_Cdt>4</Local_Cdt>
|
||||
<Max_Spdu_Outstanding>16</Max_Spdu_Outstanding>
|
||||
<Window_Time>10</Window_Time>
|
||||
<Inactivity_Time>120</Inactivity_Time>
|
||||
<Retransmission_Time>10</Retransmission_Time>
|
||||
<Max_Transmissions>2</Max_Transmissions>
|
||||
<Ak_Delay>2</Ak_Delay>
|
||||
</Tp4>
|
||||
<Tcp>
|
||||
<Rfc1006_Max_Tpdu_Len>1024</Rfc1006_Max_Tpdu_Len>
|
||||
<Rfc1006_Max_Spdu_Outstanding>50</Rfc1006_Max_Spdu_Outstanding>
|
||||
</Tcp>
|
||||
</Transport>
|
||||
<NetworkAddressing>
|
||||
<LocalAddressList>
|
||||
<LocalAddress>
|
||||
<AR_Name>local1</AR_Name>
|
||||
<AP_Title>1 3 9999 33</AP_Title>
|
||||
<AE_Qualifier>33</AE_Qualifier>
|
||||
<Psel>00 00 00 01</Psel>
|
||||
<Ssel>00 01</Ssel>
|
||||
<Tsel>00 01</Tsel>
|
||||
<TransportType>TCP</TransportType>
|
||||
<!-- TP4 or TCP or TPX -->
|
||||
</LocalAddress>
|
||||
<LocalAddress>
|
||||
<AR_Name>local1cl</AR_Name>
|
||||
<AP_Title>1 3 9999 33</AP_Title>
|
||||
<AE_Qualifier>33</AE_Qualifier>
|
||||
<Psel>00 00 00 02 </Psel>
|
||||
<Ssel>00 01</Ssel>
|
||||
<Tsel>00 01</Tsel>
|
||||
<TransportType>TCP</TransportType>
|
||||
<!-- TP4 or TCP or TPX -->
|
||||
</LocalAddress>
|
||||
</LocalAddressList>
|
||||
<RemoteAddressList>
|
||||
<RemoteAddress>
|
||||
<AR_Name>remote1</AR_Name>
|
||||
<AP_Title>1 3 9999 23</AP_Title>
|
||||
<AE_Qualifier>23</AE_Qualifier>
|
||||
<Psel>00 00 00 01</Psel>
|
||||
<Ssel>00 01</Ssel>
|
||||
<Tsel>00 01</Tsel>
|
||||
<NetAddr Type="IPADDR">127.0.0.1</NetAddr>
|
||||
<!-- EXAMPLES:
|
||||
<NetAddr Type="NSAP">49 41 4d 47 4f 4f 53 45</NetAddr>
|
||||
<NetAddr Type="IPADDR">208.176.40.52</NetAddr>
|
||||
-->
|
||||
</RemoteAddress>
|
||||
</RemoteAddressList>
|
||||
</NetworkAddressing>
|
||||
</STACK_CFG>
|
||||
<!--
|
||||
#############################################################################
|
||||
#
|
||||
# Description of NETWORK parameters
|
||||
#
|
||||
# CLNP Only Parameters:
|
||||
# ======================
|
||||
#
|
||||
# Lifetime
|
||||
# Valid range is from 1 to 255 (in 500 ms units).
|
||||
#
|
||||
# Lifetime_Decrement
|
||||
# Valid range is from 1 to 255 (in 500 ms units).
|
||||
#
|
||||
# Cfg_Timer The Configuration Timer specifies how
|
||||
# often ESH will be sent.
|
||||
# Valid range is from 0 to 32767 (seconds).
|
||||
# Note that the Holding Time in ESH sent
|
||||
# is set to 2*CfgTimer.
|
||||
# If Cfg_Timer=0 then ESH will not be sent.
|
||||
#
|
||||
# Esh_Delay Delay time before first ESH is sent.
|
||||
# Valid range is from 0 to 32767 (seconds).
|
||||
#
|
||||
# COMMON Parameters:
|
||||
# ===================
|
||||
#
|
||||
# Local_MAC Local MAC address (up to 6 hex bytes
|
||||
# separated by spaces).
|
||||
# For the ADLC sub-network the local MAC is
|
||||
# a required parameter and it has to match
|
||||
# the address in the adlc.cfg file!
|
||||
# For ADLC sub-network the MAC address is a
|
||||
# USHORT number (2 hex bytes swapped,
|
||||
# example: 30 00 hex swapped = 48 decimal).
|
||||
# For the Ethernet this param will be read
|
||||
# from the driver during initialization
|
||||
# (any value from config file will be ignored).
|
||||
#
|
||||
# Local_NSAP Local NSAP (up to 20 hex bytes separated
|
||||
# by spaces, example: 49 00 11 11).
|
||||
# This is mandatory parameter.
|
||||
#
|
||||
#############################################################################
|
||||
#
|
||||
# Description of TRANSPORT parameters
|
||||
#
|
||||
# TP4 Only Parameters:
|
||||
# ====================
|
||||
#
|
||||
# Max_Tpdu_Length
|
||||
# Max length of TPDU. Base on SNPDU size.
|
||||
# Valid values are: 128, 256, 512, 1024,
|
||||
# 2048, 4096, 8192.
|
||||
#
|
||||
# Max_Remote_Cdt
|
||||
# Max credits we can handle.
|
||||
# Will allocate this many TPDU_DT structures.
|
||||
# Valid values are: 2, 4, 8, 16.
|
||||
# CRITICAL: MUST BE POWER OF 2.
|
||||
#
|
||||
# Local_Cdt Credit value we will ALWAYS send in ACK.
|
||||
# We only accept in-sequence TPDUs so only
|
||||
# purpose of this is to allow peer to send
|
||||
# ahead.
|
||||
# Valid range is from 1 to 15.
|
||||
#
|
||||
# Max_Spdu_Outstanding
|
||||
# Max num of SPDUs outstanding per connection.
|
||||
# Will allocate this many SPDU_INFO structs
|
||||
# for transmit queue.
|
||||
# Valid values are: 2, 4, 8, 16.
|
||||
# CRITICAL: MUST BE POWER OF 2.
|
||||
#
|
||||
# Max_Spdu_Length
|
||||
# Max SPDU length.
|
||||
# Should be based on max ACSE msg size.
|
||||
# Valid range is from 1 to 65535.
|
||||
#
|
||||
# Window_Time
|
||||
# Indicates the maximum time that the
|
||||
# transport will wait before retransmitting
|
||||
# up-to-date window information.
|
||||
# Valid range is from 1 to 255 (seconds).
|
||||
#
|
||||
# Inactivity_Time
|
||||
#
|
||||
# Valid range is from 1 to 255 (seconds).
|
||||
#
|
||||
# Retransmission_Time
|
||||
# Indicates the maximum time the transport
|
||||
# will wait for acknowledgement before
|
||||
# retransmitting a TPDU.
|
||||
# Valid range is from 1 to 255 (seconds).
|
||||
#
|
||||
# Max_Transmissions
|
||||
# Max number transmissions of a TPDU.
|
||||
# Valid range is from 1 to 255.
|
||||
#
|
||||
# Ak_delay The TP4 skips some service cycles before
|
||||
# sending the transport ACK, to allow
|
||||
# concatination with DATA packet.
|
||||
# The recommended value for this parameter is 2.
|
||||
#
|
||||
# TCP (RFC1006) only parameters:
|
||||
# ==============================
|
||||
#
|
||||
# rfc1006_Max_Tpdu_Length
|
||||
# Max length of TPDU.
|
||||
# Valid values are: 128, 256, 512, 1024,
|
||||
# 2048, 4096, 8192 and 65531
|
||||
#
|
||||
# rfc1006_Max_Spdu_Outstanding
|
||||
# Max num of SPDUs that can be queued in gensock2.
|
||||
#
|
||||
#############################################################################
|
||||
#
|
||||
# Description of ADDRESSING parameters
|
||||
# Parameters for local and remote Directory Information Base (DIB)
|
||||
#
|
||||
# Common_Name Is an alias for the P-Address. It may be up
|
||||
# to 64 characters long.
|
||||
#
|
||||
# AP-Title Is an array of up to 16 SHORT decimal integers.
|
||||
# The first value should be 1 (ISO)(valid range 0-2).
|
||||
# The second value should be 1, 2 or 3 (valid range 0-39).
|
||||
# The third value is open for assignment (If you addressing is
|
||||
# local this value should be 9999, the rest of the values are
|
||||
# arbitrary.
|
||||
#
|
||||
# This is an Object Identifier assigned by the
|
||||
# network naming authority, representing the
|
||||
# Application Process Title for your particular
|
||||
# application process.
|
||||
#
|
||||
# AE-Qualifier Is a LONG decimal integer.
|
||||
#
|
||||
# This is an optional integer value used to qualify the
|
||||
# Application Entity.
|
||||
#
|
||||
# Psel Up to 16 (octets) characters of ASCII encoded hex.
|
||||
#
|
||||
# This octet string represents the Presentation Selector
|
||||
# used to identify a Presentation SAP.
|
||||
#
|
||||
# Ssel Up to 16 (octets) characters of ASCII encoded hex.
|
||||
#
|
||||
# The octet string represents the Session Selector used
|
||||
# to identify a Session SAP that can be up to 16 octets in length.
|
||||
#
|
||||
# Tsel Up to 32 (octets) characters of ASCII encoded hex.
|
||||
#
|
||||
# The octet string represents the Transport Selector used
|
||||
# to identify a Transport SAP that can be up to 16 octets in length.
|
||||
#
|
||||
#
|
||||
# Transport TP4 - for Transport Class 4
|
||||
# TCP - for Transport Class 0 (RFC1006)
|
||||
#
|
||||
# TP4 only parameters:
|
||||
# ====================
|
||||
# NSAP Up to 20 characters of ASCII encoded hex
|
||||
# TP4 only, in remote_begin section(s)
|
||||
#
|
||||
# TCP (RFC1006) only parameters:
|
||||
# ==============================
|
||||
# IPADDR IP address or alias name defined in hosts
|
||||
# file for given IP address.
|
||||
# Only in remote_begin section(s)
|
||||
#
|
||||
##############################################################################
|
||||
-->
|
@ -0,0 +1,7 @@
|
||||
SCLFileName TEMPLATE.icd
|
||||
IEDName TIED10
|
||||
AccessPointName S1
|
||||
ReportScanRate 2.0
|
||||
BRCBBufferSize 32768
|
||||
LogScanRateSeconds 2.0
|
||||
LogMaxEntries 1000
|
@ -0,0 +1,288 @@
|
||||
# Generic Makefile by tmb
|
||||
# Program name
|
||||
PROGRAM = app
|
||||
|
||||
#PLAT = x86
|
||||
PLAT = arm
|
||||
|
||||
#VER = debug
|
||||
VER = release
|
||||
|
||||
TYPE = bin
|
||||
#TYPE = so
|
||||
|
||||
##==========================================================================
|
||||
PROGRAM := $(strip $(PROGRAM))
|
||||
PLAY := $(strip $(TYPE))
|
||||
VER := $(strip $(VER))
|
||||
|
||||
MY_CFLAGS = -fmessage-length=0
|
||||
|
||||
ifeq ($(PLAT),x86)
|
||||
MY_LIBS = -lpthread -L../lib -lrt -ldl -lscl_shm -lm -lgo
|
||||
else
|
||||
MY_LIBS = -L../lib -lpthread -lrt -ldl -lscl_shm -lm -lgo
|
||||
endif
|
||||
|
||||
# The pre-processor options used by the cpp (man cpp for more).
|
||||
#CPPFLAGS = -DHAVE_CONFIG_H -Wall -Wextra -Wno-invalid-offsetof
|
||||
CPPFLAGS = -Wall -Wextra
|
||||
|
||||
# The options used in linking as well as in any direct use of ld.
|
||||
ifeq ($(TYPE),so)
|
||||
LDFLAGS = -shared -fPIC
|
||||
else
|
||||
LDFLAGS =
|
||||
endif
|
||||
|
||||
# The directories in which source files reside.
|
||||
# If not specified, only the current directory will be serached.
|
||||
SRCDIRS =
|
||||
|
||||
## Implicit Section: change the following only when necessary.
|
||||
##==========================================================================
|
||||
|
||||
# The source file types (headers excluded).
|
||||
# .c indicates C source files, and others C++ ones.
|
||||
SRCEXTS = .c .C .cc .cpp .CPP .c++ .cxx .cp
|
||||
|
||||
# The header file types.
|
||||
HDREXTS = .h .H .hh .hpp .HPP .h++ .hxx .hp
|
||||
|
||||
# The pre-processor and compiler options.
|
||||
# Users can override those variables from the command line.
|
||||
ifeq ($(VER),debug)
|
||||
ifeq ($(TYPE),so)
|
||||
CFLAGS = -ggdb -pipe -O0 -fPIC -I. -I../inc
|
||||
CXXFLAGS= -ggdb -pipe -O0 -fPIC -I. -I../inc
|
||||
else
|
||||
CFLAGS = -ggdb -pipe -O0 -I. -I../inc
|
||||
CXXFLAGS= -ggdb -pipe -O0 -I. -I../inc
|
||||
endif
|
||||
else
|
||||
ifeq ($(TYPE),so)
|
||||
CFLAGS = -O2 -pipe -fPIC -I. -I../inc
|
||||
CXXFLAGS= -O2 -pipe -fPIC -I. -I../inc
|
||||
else
|
||||
CFLAGS = -O2 -pipe -I. -I../inc
|
||||
CXXFLAGS= -O2 -pipe -I. -I../inc
|
||||
endif
|
||||
endif
|
||||
|
||||
# The C program compiler.
|
||||
ifeq ($(PLAT),x86)
|
||||
CC = gcc
|
||||
else
|
||||
CC = arm-linux-gnueabihf-gcc
|
||||
endif
|
||||
|
||||
# The C++ program compiler.
|
||||
ifeq ($(PLAT),x86)
|
||||
CXX = g++
|
||||
else
|
||||
CXX = arm-linux-gnueabihf-g++
|
||||
endif
|
||||
|
||||
# Un-comment the following line to compile C programs as C++ ones.
|
||||
#CC = $(CXX)
|
||||
|
||||
ifeq ($(PLAT),x86)
|
||||
STRIP = strip
|
||||
else
|
||||
STRIP = arm-none-linux-gnueabi-strip
|
||||
endif
|
||||
|
||||
# The command used to delete file.
|
||||
#RM = rm -f
|
||||
|
||||
ETAGS = etags
|
||||
ETAGSFLAGS =
|
||||
|
||||
CTAGS = ctags
|
||||
CTAGSFLAGS =
|
||||
|
||||
## Stable Section: usually no need to be changed.
|
||||
##==========================================================================
|
||||
SHELL = /bin/sh
|
||||
EMPTY =
|
||||
SPACE = $(EMPTY) $(EMPTY)
|
||||
ifeq ($(PROGRAM),)
|
||||
CUR_PATH_NAMES = $(subst /,$(SPACE),$(subst $(SPACE),_,$(CURDIR)))
|
||||
PROGRAM = $(word $(words $(CUR_PATH_NAMES)),$(CUR_PATH_NAMES))
|
||||
ifeq ($(PROGRAM),)
|
||||
PROGRAM = a.out
|
||||
endif
|
||||
endif
|
||||
ifeq ($(SRCDIRS),)
|
||||
SRCDIRS = .
|
||||
endif
|
||||
SOURCES = $(foreach d,$(SRCDIRS),$(wildcard $(addprefix $(d)/*,$(SRCEXTS))))
|
||||
HEADERS = $(foreach d,$(SRCDIRS),$(wildcard $(addprefix $(d)/*,$(HDREXTS))))
|
||||
SRC_CXX = $(filter-out %.c,$(SOURCES))
|
||||
OBJS = $(addsuffix .o, $(basename $(SOURCES)))
|
||||
DEPS = $(OBJS:.o=.d)
|
||||
|
||||
## Define some useful variables.
|
||||
#DEP_OPT = $(shell if `$(CC) --version | grep "GCC"`; then echo "-MM -MP"; else echo "-M"; fi )
|
||||
DEP_OPT = -M
|
||||
DEPEND = $(CC) $(DEP_OPT) $(MY_CFLAGS) $(CFLAGS) $(CPPFLAGS)
|
||||
DEPEND.d = $(subst -g ,,$(DEPEND))
|
||||
COMPILE.c = $(CC) $(MY_CFLAGS) $(CFLAGS) $(CPPFLAGS) -c
|
||||
COMPILE.cxx = $(CXX) $(MY_CFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c
|
||||
LINK.c = $(CC) $(MY_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cxx = $(CXX) $(MY_CFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
|
||||
.PHONY: all objs tags ctags clean distclean help show objclean
|
||||
|
||||
# Delete the default suffixes
|
||||
.SUFFIXES:
|
||||
|
||||
all: $(PROGRAM)
|
||||
|
||||
# Rules for creating dependency files (.d).
|
||||
#------------------------------------------
|
||||
|
||||
%.d:%.c
|
||||
@echo -n $(dir $<) > $@
|
||||
@$(DEPEND.d) $< >> $@
|
||||
|
||||
%.d:%.C
|
||||
@echo -n $(dir $<) > $@
|
||||
@$(DEPEND.d) $< >> $@
|
||||
|
||||
%.d:%.cc
|
||||
@echo -n $(dir $<) > $@
|
||||
@$(DEPEND.d) $< >> $@
|
||||
|
||||
%.d:%.cpp
|
||||
@echo -n $(dir $<) > $@
|
||||
@$(DEPEND.d) $< >> $@
|
||||
|
||||
%.d:%.CPP
|
||||
@echo -n $(dir $<) > $@
|
||||
@$(DEPEND.d) $< >> $@
|
||||
|
||||
%.d:%.c++
|
||||
@echo -n $(dir $<) > $@
|
||||
@$(DEPEND.d) $< >> $@
|
||||
|
||||
%.d:%.cp
|
||||
@echo -n $(dir $<) > $@
|
||||
@$(DEPEND.d) $< >> $@
|
||||
|
||||
%.d:%.cxx
|
||||
@echo -n $(dir $<) > $@
|
||||
@$(DEPEND.d) $< >> $@
|
||||
|
||||
# Rules for generating object files (.o).
|
||||
#----------------------------------------
|
||||
objs:$(OBJS)
|
||||
|
||||
%.o:%.c
|
||||
@$(COMPILE.c) $< -o $@
|
||||
@echo "[M] $@"
|
||||
|
||||
%.o:%.C
|
||||
@$(COMPILE.cxx) $< -o $@
|
||||
@echo "[M] $@"
|
||||
|
||||
%.o:%.cc
|
||||
@$(COMPILE.cxx) $< -o $@
|
||||
@echo "[M] $@"
|
||||
|
||||
%.o:%.cpp
|
||||
@$(COMPILE.cxx) $< -o $@
|
||||
@echo "[M] $@"
|
||||
|
||||
%.o:%.CPP
|
||||
$(COMPILE.cxx) $< -o $@
|
||||
|
||||
%.o:%.c++
|
||||
$(COMPILE.cxx) $< -o $@
|
||||
|
||||
%.o:%.cp
|
||||
$(COMPILE.cxx) $< -o $@
|
||||
|
||||
%.o:%.cxx
|
||||
@$(COMPILE.cxx) $< -o $@
|
||||
@echo "[M] $@"
|
||||
|
||||
# Rules for generating the tags.
|
||||
#-------------------------------------
|
||||
tags: $(HEADERS) $(SOURCES)
|
||||
$(ETAGS) $(ETAGSFLAGS) $(HEADERS) $(SOURCES)
|
||||
|
||||
ctags: $(HEADERS) $(SOURCES)
|
||||
$(CTAGS) $(CTAGSFLAGS) $(HEADERS) $(SOURCES)
|
||||
|
||||
# Rules for generating the executable.
|
||||
#-------------------------------------
|
||||
$(PROGRAM):$(OBJS)
|
||||
ifeq ($(SRC_CXX),)
|
||||
@$(LINK.c) $(OBJS) $(MY_LIBS) -o $@
|
||||
@echo "[L] $@"
|
||||
@$(STRIP) $(PROGRAM)
|
||||
@echo "[S] $(PROGRAM)"
|
||||
@$(RM) $(DEPS)
|
||||
@echo "*** version:$(VER)-$(PLAT): Build $@ Finished ***"
|
||||
else
|
||||
@$(LINK.cxx) $(OBJS) $(MY_LIBS) -o $@
|
||||
@echo "[L] $@"
|
||||
@$(STRIP) $(PROGRAM)
|
||||
@echo "[S] $(PROGRAM)"
|
||||
@$(RM) $(DEPS)
|
||||
@echo "*** version:$(VER)-$(PLAT): Build $@ Finished ***"
|
||||
endif
|
||||
|
||||
ifndef NODEP
|
||||
ifneq ($(DEPS),)
|
||||
sinclude $(DEPS)
|
||||
endif
|
||||
endif
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJS) $(PROGRAM) $(DEPS)
|
||||
|
||||
distclean: clean
|
||||
$(RM) $(DEPS) TAGS
|
||||
|
||||
objclean:
|
||||
$(RM) $(OBJ) $(DEPS)
|
||||
|
||||
# Show help.
|
||||
help:
|
||||
@echo 'Generic Makefile for C/C++ Programs version'
|
||||
@echo
|
||||
@echo 'Usage: make [TARGET]'
|
||||
@echo 'TARGETS:'
|
||||
@echo ' all (=make) compile and link.'
|
||||
@echo ' NODEP=yes make without generating dependencies.'
|
||||
@echo ' objs compile only (no linking).'
|
||||
@echo ' tags create tags for Emacs editor.'
|
||||
@echo ' ctags create ctags for VI editor.'
|
||||
@echo ' clean clean objects and the executable file.'
|
||||
@echo ' distclean clean objects, the executable and dependencies.'
|
||||
@echo ' show show variables (for debug use only).'
|
||||
@echo ' help print this message.'
|
||||
@echo
|
||||
@$(RM) $(DEPS)
|
||||
|
||||
# Show variables (for debug use only.)
|
||||
show:
|
||||
@echo 'PROGRAM :' $(PROGRAM)
|
||||
@echo 'PLAT :' $(PLAT)
|
||||
@echo 'TYPE :' $(TYPE)
|
||||
@echo 'SRCDIRS :' $(SRCDIRS)
|
||||
@echo 'HEADERS :' $(HEADERS)
|
||||
@echo 'SOURCES :' $(SOURCES)
|
||||
@echo 'SRC_CXX :' $(SRC_CXX)
|
||||
@echo 'OBJS :' $(OBJS)
|
||||
@echo 'DEPS :' $(DEPS)
|
||||
@echo 'DEPEND :' $(DEPEND)
|
||||
@echo 'COMPILE.c :' $(COMPILE.c)
|
||||
@echo 'COMPILE.cxx :' $(COMPILE.cxx)
|
||||
@echo 'link.c :' $(LINK.c)
|
||||
@echo 'link.cxx :' $(LINK.cxx)
|
||||
|
||||
|
||||
############################# End of the Makefile ################################
|
@ -0,0 +1,23 @@
|
||||
#! /bin/sh
|
||||
|
||||
ntpdate=/usr/sbin/ntpdate
|
||||
|
||||
test -x "$ntpdate" || exit 0
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting ntpdate daemon"
|
||||
start-stop-daemon --start --background --exec $ntpdate
|
||||
echo "."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping ntpdate daemon"
|
||||
start-stop-daemon --stop --name ntpdate
|
||||
echo "."
|
||||
;;
|
||||
*)
|
||||
echo "Usage: /etc/init.d/ntpdate {start|stop}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
@ -0,0 +1,23 @@
|
||||
#! /bin/sh
|
||||
|
||||
srvrd=/usr/sbin/scl_srvr_ld
|
||||
|
||||
test -x "$srvrd" || exit 0
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting srvrd daemon"
|
||||
start-stop-daemon --start --background --exec $srvrd -- -d /scl_srvr
|
||||
echo "."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping srvrd daemon"
|
||||
start-stop-daemon --stop --name scl_srvr_ld
|
||||
echo "."
|
||||
;;
|
||||
*)
|
||||
echo "Usage: /etc/init.d/S80srvrd {start|stop}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
@ -0,0 +1,23 @@
|
||||
#! /bin/sh
|
||||
|
||||
usr_app_d=/usr_app/app
|
||||
|
||||
test -x "$usr_app_d" || exit 0
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting user appliction daemon"
|
||||
start-stop-daemon --start --background --exec $usr_app_d
|
||||
echo "."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping user appliction daemon"
|
||||
start-stop-daemon --stop --name app
|
||||
echo "."
|
||||
;;
|
||||
*)
|
||||
echo "Usage: /etc/init.d/S90app {start|stop}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
@ -0,0 +1,23 @@
|
||||
#! /bin/sh
|
||||
|
||||
fileprocess=/usr/sbin/fileprocess
|
||||
|
||||
test -x "$fileprocess" || exit 0
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting fileprocess daemon"
|
||||
start-stop-daemon --start --background --exec $fileprocess
|
||||
echo "."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping fileprocess daemon"
|
||||
start-stop-daemon --stop --name fileprocess
|
||||
echo "."
|
||||
;;
|
||||
*)
|
||||
echo "Usage: /etc/init.d/S91fileprocess {start|stop}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,11 @@
|
||||
#ifndef _ANALYSIS_H
|
||||
#define _ANALYSIS_H
|
||||
|
||||
#define RSV_SPACE_SIZE 344
|
||||
|
||||
extern int send_analysis_req(char *file_name,int len);
|
||||
extern int analysis_init(void);
|
||||
|
||||
#endif
|
||||
|
||||
|
Binary file not shown.
@ -0,0 +1,87 @@
|
||||
#include "common.h"
|
||||
#include <pthread.h>
|
||||
|
||||
YSP_IEC_DATA ysp_glb_data;
|
||||
|
||||
OUTPUT_TYPE_DEF my_output_data;
|
||||
INPUT_TYPE_DEF my_input_data;
|
||||
SAMPLE_INPUT_TYPE my_sample_data;
|
||||
|
||||
YSP_PARA my_para_data;
|
||||
unsigned int last_sample_time;
|
||||
ANALY_RESULT ana_result;
|
||||
|
||||
pthread_mutex_t my_output_mutex;
|
||||
pthread_mutex_t my_input_mutex;
|
||||
static int mutex_inited=0;
|
||||
|
||||
float last_co2_ppm=0;
|
||||
int co2_is_ok=0;
|
||||
|
||||
int comunication_flg=0;
|
||||
|
||||
PID_ATune HeatAutoTuner;
|
||||
AUTO_TUNE_RECORD HeatTuneRecord;
|
||||
|
||||
int ctrl_fd=-1; //¿ØÖư崮¿Ú
|
||||
int sample_fd=-1;//²É¼¯°å´®¿Ú
|
||||
|
||||
|
||||
void mutex_init(void)
|
||||
{
|
||||
if(!mutex_inited)
|
||||
{
|
||||
if(pthread_mutex_init(&my_output_mutex,NULL)!=0)
|
||||
{
|
||||
printf("init output mutex failed\r\n");
|
||||
return;
|
||||
}
|
||||
if(pthread_mutex_init(&my_input_mutex,NULL)!=0)
|
||||
{
|
||||
printf("init input mutex failed\r\n");
|
||||
return;
|
||||
}
|
||||
mutex_inited++;
|
||||
}
|
||||
}
|
||||
|
||||
void lock_input_data(void)
|
||||
{
|
||||
pthread_mutex_lock(&my_input_mutex);
|
||||
}
|
||||
|
||||
void unlock_input_data(void)
|
||||
{
|
||||
pthread_mutex_unlock(&my_input_mutex);
|
||||
}
|
||||
|
||||
void lock_output_data(void)
|
||||
{
|
||||
pthread_mutex_lock(&my_output_mutex);
|
||||
}
|
||||
|
||||
void unlock_output_data(void)
|
||||
{
|
||||
pthread_mutex_unlock(&my_output_mutex);
|
||||
}
|
||||
|
||||
unsigned char cal_sum(unsigned char *buf,unsigned int len)
|
||||
{
|
||||
unsigned char sum=0;
|
||||
unsigned int i;
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
sum+=(*buf++);
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
|
||||
int chk_sum(unsigned char *buf,unsigned int len,unsigned char sum)
|
||||
{
|
||||
unsigned char tmp=0;
|
||||
tmp=cal_sum(buf,len);
|
||||
if(sum==tmp)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
@ -0,0 +1,481 @@
|
||||
#ifndef _COMMON_H
|
||||
#define _COMMON_H
|
||||
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
#include "scl_shm.h"
|
||||
#include "PID_AutoTune.h"
|
||||
|
||||
#define WEB_DIR "/var/www/web"
|
||||
|
||||
//#define STOP_SAMPLE_COOL
|
||||
//#define YSP_DEBUG
|
||||
|
||||
/*
|
||||
#ifdef YSP_DEBUG
|
||||
#define ysp_log((x)) printf(x)
|
||||
#else
|
||||
#define ysp_log(x)
|
||||
#endif */
|
||||
|
||||
#define CTRL_SERIAL_DEV "/dev/ttyO4"
|
||||
//#define CTRL_SERIAL_DEV "/dev/ttyUSB0"
|
||||
#define CTRL_SERIAL_SPEED 115200
|
||||
|
||||
#define SAMPLE_SERIAL_DEV "/dev/ttyO2"
|
||||
#define SAMPLE_SERIAL_SPEED 115200
|
||||
|
||||
|
||||
#define CTRL_TX_MQ "/ctrl_tx_mq"
|
||||
#define CTRL_TX_MAX_MESSAGE 16
|
||||
#define CTRL_TX_MESSAGE_SIZE 1024
|
||||
#define CTRL_MQ_PRIO 31
|
||||
|
||||
#define OFF 0
|
||||
#define ON 1
|
||||
|
||||
#define INDEX_H2 0
|
||||
#define INDEX_CO 1
|
||||
#define INDEX_CH4 2
|
||||
#define INDEX_C2H4 3
|
||||
#define INDEX_C2H6 4
|
||||
#define INDEX_C2H2 5
|
||||
|
||||
#define CO2_SAMPLE_LEN 50
|
||||
#define CO2_BACK_NUM 150
|
||||
|
||||
//继电器定义
|
||||
#define RLY_OIL 14 //油泵
|
||||
#define RLY_YV4 3 //油缸退(I5反馈)
|
||||
#define RLY_YV5 4 //油缸进(I4反馈)
|
||||
#define RLY_YV6 5//气缸退(I7反馈)
|
||||
#define RLY_YV7 6 //气缸进(I6反馈)
|
||||
#define RLY_YV8 7
|
||||
#define RLY_YV9 8
|
||||
#define RLY_YV10 19 //清洗阀(进载气清洗)
|
||||
#define RLY_YV11 10 //气缸进油阀(脱气)
|
||||
#define RLY_YV12 11 //进气到集气缸阀
|
||||
#define RLY_YV13 12 //出油阀
|
||||
#define RLY_YV14 13 //清洗排空阀
|
||||
|
||||
//注意新RLY_A板V2版本将YV15-YV16移动到7,8了
|
||||
//#define RLY_YV15 14 //样气进气缸阀
|
||||
//#define RLY_YV16 15//进油阀
|
||||
#define RLY_YV15 7 //样气进气缸阀
|
||||
#define RLY_YV16 8//进油阀
|
||||
|
||||
#define RLY_YV17 16//样气压力平衡气阀
|
||||
#define RLY_YV18 17//吹扫阀
|
||||
#define RLY_YV19 18//定量阀(6通阀)
|
||||
//#define RLY_YV20 19//传感器平衡阀
|
||||
#define RLY_YV21 20//CO2传感器检测阀
|
||||
|
||||
#define RLY_KA1 14 //抽油电机
|
||||
//#define RLY_KA2 22 //传感器加热开关
|
||||
#define RLY_KA3 23 //柜子风扇
|
||||
|
||||
|
||||
#define RLY_KA4 24 //采样单元风扇
|
||||
#define RLY_KA5 25 //采样电源控制信号
|
||||
#define RLY_KA6 26 //冷井风扇输出
|
||||
#define RLY_KA7 27 //冷井电源控制信号
|
||||
#define RLY_SENSOR 29 //传感器加热控制
|
||||
|
||||
#define RLY_FAN 30 //采样单元排热风扇
|
||||
#define RLY_PUMP 31 //气泵启停控制(220v,550w)
|
||||
|
||||
#define RLY_KA8 21 //排水阀
|
||||
|
||||
|
||||
#define STA_I4 0//油缸进到位指示
|
||||
#define STA_I5 1//油缸退到位指示
|
||||
#define STA_I6 2//气缸进到位指示
|
||||
#define STA_I7 3//气缸退到位指示
|
||||
|
||||
//注意新RLY_A板V2版本将I8-I9移动到6,7了
|
||||
//#define STA_I8 4//油位液位开关(定量传感器)
|
||||
//#define STA_I9 5//集气缸进油检测开关
|
||||
|
||||
#define STA_I8 6//油位液位开关(定量传感器)
|
||||
#define STA_I9 7//集气缸进油检测开关
|
||||
|
||||
|
||||
|
||||
#define PRES_PA1 0 //载气压力检测通道
|
||||
#define PRES_GAS_PUMP 1 //气缸压力
|
||||
|
||||
#define START_PRES 0.25 //Mpa
|
||||
#define STOP_PRES 0.51 //Mpa
|
||||
|
||||
#define TEMP_SPZ 0 //色谱柱温度通道
|
||||
#define TEMP_LJ 2 //冷井温度通道
|
||||
#define TEMP_SAM 3 //采样单元温度通道
|
||||
#define TEMP_ENV 1 //环境温度(柜内温度)
|
||||
#define TEMP_OUTSIDE 4 //室外温度
|
||||
|
||||
|
||||
#define PID_SPZ 0 //色谱柱PID通道
|
||||
#define PID_LJ 2 //冷井PID通道,输出对应A3
|
||||
#define PID_SAMPLE 3 //采样单元PID通道号,输出对应A2
|
||||
|
||||
|
||||
#define PID_EN 1
|
||||
#define PID_DIS 0
|
||||
|
||||
|
||||
#define I7_WAIT_CNT 12
|
||||
#define I7_WAIT_MAX 24
|
||||
#define I6_WAIT_CNT 12
|
||||
#define I6_WAIT_MAX 24
|
||||
|
||||
#define I4_WAIT_CNT 8
|
||||
#define I4_WAIT_MAX 24
|
||||
#define I5_WAIT_CNT 8
|
||||
#define I5_WAIT_MAX 24
|
||||
|
||||
|
||||
#define GAS_CLEAN_MAX_STEP 17 //气路清洗最大步骤
|
||||
#define GAS_CLEAN_MAX_TIME 600 //气路清洗最长时间
|
||||
#define CLEAN_AIR_REPEAT_CNT 3 //空气清洗次数
|
||||
#define CLEAN_CARRIER_REPEAT_CNT 6 //载气清洗次数
|
||||
#define GAS_MAKE_REPEAT_CNT 2 //制气重复次数
|
||||
|
||||
#define YV10_ON_TIME 12 //进载气时间6秒
|
||||
#define MOTOR_RUN_TIME (3*60*2) //抽油电机运行3分钟
|
||||
#define GAS_ADMISSION_TIME 8 //进油气时间4秒
|
||||
#define GAS_MAKE_TIME (4*60*2) //油气制作时间4分钟
|
||||
|
||||
|
||||
//状态定义
|
||||
#define MODE_IDLE 0
|
||||
#define SIX_SAMPLE 1 //6组分采样
|
||||
#define DEMARCATE 2 //标定
|
||||
#define REMOVE_GAS 3 //脱气
|
||||
#define GAS_FAULT_PROCESS 4 //脱气故障处理
|
||||
#define PUMP_OIL_PROCESS 5
|
||||
|
||||
//命令定义
|
||||
#define ENTER_IDLE 0
|
||||
#define START_SIX_SAMPLE 1
|
||||
#define START_DEMARCATE 2
|
||||
#define START_RM_GAS 3
|
||||
#define START_FAULT_PROCESS 4
|
||||
#define START_OIL_PROCESS 5
|
||||
#define STOP_SAMPLE 6
|
||||
|
||||
|
||||
#define NORMAL_PRES 0.103 //Mpa
|
||||
#define DELT_PRES 0.005
|
||||
#define SPZ_TEMP_DELT 0.01
|
||||
|
||||
|
||||
|
||||
//低字节序品质定义,由于是低字节序,mmslite会将高低字节倒过来
|
||||
#define GOOD 0x0000
|
||||
#define INVALID 0x0040
|
||||
#define QUESTIONABLE 0x00C0
|
||||
|
||||
#define OVERFLOWED 0x0020
|
||||
#define OUTOFRANGE 0x0010
|
||||
#define BADREFERENCE 0x0008
|
||||
#define OSCILLATORY 0x0004
|
||||
#define FAILURED 0x0002
|
||||
#define OLDDATA 0x0001
|
||||
#define INCONSISTENT 0x8000
|
||||
#define INACCURATE 0x4000
|
||||
|
||||
#define SUBSTITUTED 0x2000
|
||||
#define TEST 0x1000
|
||||
|
||||
typedef struct{
|
||||
int auto_turn;
|
||||
float tune_input;
|
||||
unsigned short tune_output;
|
||||
}AUTO_TUNE_RECORD;
|
||||
|
||||
typedef struct{
|
||||
int step;
|
||||
int dly_cnt;
|
||||
int repeat_cnt;
|
||||
}CLEAN_STAT;
|
||||
|
||||
typedef struct{
|
||||
int cmd;//命令
|
||||
int src;//发送者
|
||||
}ACTION_MSG_TYPE;//动作消息定义
|
||||
|
||||
typedef struct{
|
||||
unsigned int t;
|
||||
unsigned int stNum;
|
||||
unsigned int sqNum;
|
||||
unsigned char dataSet;
|
||||
unsigned char numDatEntries;
|
||||
unsigned short next_time;
|
||||
}COM_HEADER;
|
||||
|
||||
|
||||
|
||||
typedef struct{
|
||||
float Kp;
|
||||
float Ki;
|
||||
float Kd;
|
||||
}PID_TYPE_DEF;
|
||||
|
||||
typedef struct{
|
||||
unsigned int relay_ctrl; //继电器控制
|
||||
unsigned char pid_en[4]; //PID使能0-1加热,2-3制冷,0关闭,非零开启
|
||||
float temperature[4];//0-1加热,2-3制冷
|
||||
float volt_output[2];//0-5V输出控制
|
||||
PID_TYPE_DEF pid_para[3]; //PID参数,通道0色谱柱,通道1冷井,输出到A3,通道2是采样室,输出到A2
|
||||
unsigned short man_output[4];//ch0=色谱柱 ch1=保留 ch2=冷井 ch3=采样单元
|
||||
}OUTPUT_TYPE_DEF;//输出数据结构定义
|
||||
|
||||
|
||||
typedef struct{
|
||||
PID_TYPE_DEF heat_pid[2];
|
||||
PID_TYPE_DEF cool_pid[2];
|
||||
}OUTPUT_PARA_DEF;//PID参数定义
|
||||
|
||||
|
||||
typedef struct{
|
||||
//input
|
||||
float PresVolt[5]; //pres
|
||||
float temperature[5];//
|
||||
unsigned int io_input; //io输入
|
||||
|
||||
//output
|
||||
unsigned int relay_state; //继电器输出
|
||||
unsigned short pwm_out[2]; //pwm输出
|
||||
unsigned short vi_out[4]; //模拟量输出
|
||||
unsigned char pid_en[4]; //pid控制通道工作状态
|
||||
unsigned int work_state; //工作状态
|
||||
float temp;//油温
|
||||
float humidity;//湿度
|
||||
float water;//微水
|
||||
unsigned short com_flg; //微水传感器通讯状态,0=OK,1=FAILED
|
||||
}INPUT_TYPE_DEF; //输入数据结构
|
||||
|
||||
|
||||
|
||||
typedef struct{
|
||||
unsigned int data_flg;
|
||||
int ref_out;
|
||||
int sen_in;
|
||||
int amp_in;
|
||||
float temperature;
|
||||
float humidity;
|
||||
unsigned int co2_ppm;
|
||||
unsigned int co2_len;
|
||||
}SAMPLE_INPUT_TYPE;
|
||||
|
||||
|
||||
typedef struct{
|
||||
float a;
|
||||
float b;
|
||||
}PRES_FAC_TYPE;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char version[16];
|
||||
char station[64];
|
||||
char device[64];
|
||||
unsigned int start_hour; //采样开始时刻
|
||||
unsigned int start_minute; //采样开始分钟
|
||||
unsigned int start_interval;//采样间隔
|
||||
PRES_FAC_TYPE pres_fac[8]; //8组压力计算系数
|
||||
float volt_output[2];//0-5V输出控制
|
||||
float temperature[4];//0-1加热,2-3制冷
|
||||
unsigned char pid_en[4]; //4路PID使能信号
|
||||
PID_TYPE_DEF pid_type_def[4];//4路pid参数
|
||||
unsigned int sample_len; //采集长度1-5000
|
||||
unsigned int sample_rate; //采样率,单位为毫秒,取值范围为1-1000
|
||||
unsigned int sample_offs; //采样偏置设置0-4095,对应0-3.3v
|
||||
unsigned int sample_cool_en; //
|
||||
unsigned int co2_pos;
|
||||
unsigned int h2o_en;
|
||||
unsigned int auto_gas_en;//自动造气体
|
||||
unsigned int run_mode; //运行模式
|
||||
unsigned int upload_time; //上传时间间隔
|
||||
}MACHINE_RUN_PARA;//机器参数定义
|
||||
|
||||
|
||||
|
||||
typedef struct{
|
||||
int start;//起始位置
|
||||
int peak;//峰顶位置
|
||||
int end;//结束位置
|
||||
int width; //峰宽
|
||||
}KEY_POS_TYPE;//查找到的位置定义
|
||||
|
||||
typedef struct
|
||||
{
|
||||
KEY_POS_TYPE position[6];
|
||||
}FIND_POS_DATA;
|
||||
|
||||
|
||||
typedef struct{
|
||||
COM_HEADER header;
|
||||
}COM_FRAME;
|
||||
|
||||
typedef struct{
|
||||
int start;//起始位置
|
||||
int peak;//峰顶位置
|
||||
int end;//结束位置
|
||||
int width; //峰宽
|
||||
}POSSIBLE_POS_TYPE;//可能的位置定义
|
||||
|
||||
typedef struct{
|
||||
float lYmin;//左梯度
|
||||
float lXmax;
|
||||
float rYmin;
|
||||
float rXmax;
|
||||
}GRADIENT_TYPE_DEF;//梯度定义
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float fac[6]; //依次为K值,柱修正系数,脱气率修正系数,最小面积,最大面积,离线/在线计算偏差基值
|
||||
}FACTOR_TYPE;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
FACTOR_TYPE k[12]; //12级修正系数
|
||||
}CORRECTION_FACTOR_TYPE;
|
||||
|
||||
|
||||
typedef struct{
|
||||
POSSIBLE_POS_TYPE position; //可能的位置定义
|
||||
GRADIENT_TYPE_DEF gradient; //梯度定义
|
||||
CORRECTION_FACTOR_TYPE correct_fac;//修正系数定义
|
||||
}GAS_CAL_PARA;//气体浓度计算参数
|
||||
|
||||
|
||||
|
||||
typedef struct{
|
||||
MACHINE_RUN_PARA mach_run_para; //机器运行参数
|
||||
GAS_CAL_PARA gas_cal_fac[6]; //气体浓度计算系数,依次为H2,CO,CH4,C2H4,C2H6,C2H2
|
||||
GAS_CAL_PARA co2_cal_fac;//CO2计算参数
|
||||
}YSP_PARA;//油色谱参数定义
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
typedef struct
|
||||
{
|
||||
float v;
|
||||
int q;
|
||||
unsigned int t;
|
||||
} MV;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int v;
|
||||
int q;
|
||||
unsigned int t;
|
||||
} MV_I;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char v;
|
||||
int q;
|
||||
unsigned int t;
|
||||
}SPS;
|
||||
|
||||
typedef union{
|
||||
MV f;
|
||||
MV_I i;
|
||||
SPS stVal;
|
||||
}SCL_VAL;*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int secs; // Number of seconds since January 1, 1970
|
||||
unsigned int fraction; // Fraction of a second
|
||||
unsigned int qflags; // Quality flags, 8 least-significant bits only
|
||||
}Timestamp;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float H2ppm;
|
||||
float COppm;
|
||||
float CH4ppm;
|
||||
float C2H2ppm;
|
||||
float C2H4ppm;
|
||||
float C2H6ppm;
|
||||
float TotHyd;
|
||||
int SmpTm; //采样时间
|
||||
float CO2ppm;//
|
||||
float Mst; //微水
|
||||
float temp; //油温
|
||||
}YSP_PRI_DATA;//油色谱原始数据
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int start;
|
||||
int peak;
|
||||
}POS_INFO;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
YSP_PRI_DATA result;
|
||||
int find_mask;
|
||||
POS_INFO pos_info[6];//找到的位置
|
||||
float area[6];//计算出的面积
|
||||
float spzTemp1;//采样前色谱柱温度
|
||||
float spzTemp2;//采样后色谱柱温度
|
||||
float samTemp1;//采样前采样室温度
|
||||
float samTemp2;//采样后采样室温度
|
||||
float pres;//采样后载气压力
|
||||
}ANALY_RESULT;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
USR_MV H2ppm; //氢气含量0
|
||||
USR_MV COppm; //一氧化碳含量1
|
||||
USR_MV CH4ppm; //甲烷含量2
|
||||
USR_MV C2H4ppm; //乙烯含量3
|
||||
USR_MV C2H6ppm; //乙烷含量4
|
||||
USR_MV C2H2ppm; //乙炔含量5
|
||||
USR_MV TotHyd; //总烃含量6
|
||||
USR_MV SmpTm; //采样时间(mv_i)7
|
||||
USR_MV CO2ppm; //二氧化碳含量8
|
||||
USR_MV Mst; //微水含量9
|
||||
USR_MV Tmp; //绝缘液体温度10
|
||||
USR_MV GasPres; //载气压力11
|
||||
USR_MV GasBot; //异常的气瓶号(ins)12
|
||||
USR_MV MoDevConf; //IED与监测设备通讯异常(sps)13
|
||||
USR_MV SupDevRun; //监测设备运行异常(sps)14
|
||||
USR_MV GasUnPresAlm; //载气欠压告警(sps)15
|
||||
USR_MV GasLowPresAlm;//载气低压告警(sps)16
|
||||
USR_MV ActCyGasSta; //实际气瓶供气状态异常(sps)17
|
||||
}YSP_IEC_DATA; //油色谱IEC 61850数据
|
||||
|
||||
extern ANALY_RESULT ana_result;
|
||||
extern float last_co2_ppm;
|
||||
extern int co2_is_ok;
|
||||
extern OUTPUT_TYPE_DEF my_output_data;
|
||||
extern INPUT_TYPE_DEF my_input_data;
|
||||
extern SAMPLE_INPUT_TYPE my_sample_data;
|
||||
extern YSP_PARA my_para_data;
|
||||
extern unsigned int last_sample_time;
|
||||
extern int comunication_flg;
|
||||
extern PID_ATune HeatAutoTuner;
|
||||
extern AUTO_TUNE_RECORD HeatTuneRecord;
|
||||
extern unsigned int curr_state;
|
||||
extern YSP_IEC_DATA ysp_glb_data;
|
||||
extern void mutex_init(void);
|
||||
extern void lock_input_data(void);
|
||||
extern void unlock_input_data(void);
|
||||
extern void lock_output_data(void);
|
||||
extern void unlock_output_data(void);
|
||||
|
||||
extern unsigned char cal_sum(unsigned char *buf,unsigned int len);
|
||||
extern int chk_sum(unsigned char *buf,unsigned int len,unsigned char sum);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -0,0 +1,650 @@
|
||||
/*
|
||||
* ctrl_process.c
|
||||
*
|
||||
* Created on: May 4, 2015
|
||||
* Author: root
|
||||
*/
|
||||
#include "common.h"
|
||||
#include <stdlib.h>
|
||||
#include "thread.h"
|
||||
#include <pthread.h>
|
||||
#include "msq.h"
|
||||
#include "serial.h"
|
||||
#include "ysp_debug.h"
|
||||
#include <time.h>
|
||||
|
||||
#define MAX_SEND_TIME_CURVE 5
|
||||
#define MAX_SAVE_TEMP 256
|
||||
|
||||
mqd_t ctrl_tx_mq;//
|
||||
|
||||
extern int ctrl_fd;//控制信号发送串口句柄
|
||||
|
||||
COM_HEADER ctrl_tx_header;
|
||||
COM_HEADER ctrl_rx_header;
|
||||
|
||||
OUTPUT_TYPE_DEF ctrl_tx_data;
|
||||
|
||||
unsigned char ctrl_tx_buf[128];//串口发送缓冲区
|
||||
unsigned char ctrl_rx_buf[128];//
|
||||
|
||||
unsigned char ctrl_tx_mq_buf[CTRL_TX_MESSAGE_SIZE];//消息队列接收缓冲区
|
||||
|
||||
static const unsigned int timeout_curve[MAX_SEND_TIME_CURVE]={
|
||||
200000,300000,500000,1000000,2000000
|
||||
};//发送间隔
|
||||
|
||||
|
||||
float latest_spz_temp[MAX_SAVE_TEMP];
|
||||
unsigned char spz_save_index=0;
|
||||
/*
|
||||
static const char *relay_name[]={
|
||||
"LJ_FAN",
|
||||
"SAMPLE_FAN",
|
||||
"YV6",
|
||||
"YV4",
|
||||
"no_use",
|
||||
"no_use",
|
||||
"YV7",
|
||||
"YV14",
|
||||
"YV13",
|
||||
"YV10",
|
||||
"YV11",
|
||||
"YV12",
|
||||
"no",
|
||||
"no",
|
||||
"no",
|
||||
"YV16",
|
||||
"YV17",
|
||||
"YV18",
|
||||
"YV19",
|
||||
"YV20",
|
||||
"YV21",
|
||||
"NO",
|
||||
"NO",
|
||||
"NO",
|
||||
"NO",
|
||||
"NO",
|
||||
"NO",
|
||||
"NO",
|
||||
"NO",
|
||||
"NO",
|
||||
"NO",
|
||||
};*/
|
||||
|
||||
|
||||
void arm_var_f32(float *pSrc,unsigned int blockSize,float *pResult)
|
||||
{
|
||||
float sum = (float) 0.0;
|
||||
float meanOfSquares, mean, in, squareOfMean;
|
||||
unsigned int blkCnt;
|
||||
float *pIn;
|
||||
pIn = pSrc;
|
||||
blkCnt = blockSize>>2u;
|
||||
while(blkCnt>0u)
|
||||
{
|
||||
in = *pSrc++;
|
||||
sum += in * in;
|
||||
in = *pSrc++;
|
||||
sum += in * in;
|
||||
in = *pSrc++;
|
||||
sum += in * in;
|
||||
in = *pSrc++;
|
||||
sum += in * in;
|
||||
blkCnt--;
|
||||
}
|
||||
blkCnt = blockSize % 0x4u;
|
||||
|
||||
while(blkCnt>0u)
|
||||
{
|
||||
in = *pSrc++;
|
||||
sum += in * in;
|
||||
blkCnt--;
|
||||
}
|
||||
meanOfSquares = sum/((float) blockSize-1.0f);
|
||||
|
||||
sum = 0.0f;
|
||||
|
||||
|
||||
blkCnt = blockSize>>2u;
|
||||
|
||||
pSrc = pIn;
|
||||
|
||||
while(blkCnt>0u)
|
||||
{
|
||||
sum += *pSrc++;
|
||||
sum += *pSrc++;
|
||||
sum += *pSrc++;
|
||||
sum += *pSrc++;
|
||||
blkCnt--;
|
||||
}
|
||||
|
||||
blkCnt = blockSize%0x4u;
|
||||
|
||||
while(blkCnt>0u)
|
||||
{
|
||||
sum += *pSrc++;
|
||||
blkCnt--;
|
||||
}
|
||||
mean = sum/(float)blockSize;
|
||||
|
||||
squareOfMean = (mean * mean) *(((float)blockSize)/((float)blockSize-1.0f));
|
||||
*pResult = meanOfSquares - squareOfMean;
|
||||
}
|
||||
|
||||
void save_spz_temp(float *temp)
|
||||
{
|
||||
latest_spz_temp[spz_save_index++]=*temp;
|
||||
}
|
||||
|
||||
int get_spz_stable(float *delt)
|
||||
{
|
||||
lock_input_data();
|
||||
arm_var_f32(latest_spz_temp,sizeof(latest_spz_temp)/sizeof(float),delt);
|
||||
unlock_input_data();
|
||||
/*if(*delt<SPZ_TEMP_DELT)
|
||||
return 0;
|
||||
return 1; */
|
||||
return 0;
|
||||
}
|
||||
|
||||
int set_gpio_output(int index,int val)
|
||||
{
|
||||
static int iofd[4]={-1,-1,-1,-1};
|
||||
char c;
|
||||
if(iofd[index]<0)
|
||||
{
|
||||
if((iofd[index]=open("/sys/class/leds/mcu_intr/brightness",O_WRONLY))==-1)//打开设备
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("open %s failed \n",io_dev_name[index]);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
c = val?'1':'0';
|
||||
return write(iofd[index],&c,1);//写数据到设备
|
||||
}
|
||||
|
||||
int send_ctrl_frame(int dev_fd,COM_HEADER *head,void *data,unsigned int data_length)
|
||||
{
|
||||
unsigned int data_bytes;
|
||||
int ret;
|
||||
data_bytes=sizeof(COM_HEADER)+data_length;
|
||||
ctrl_tx_buf[0]=0xAA;
|
||||
ctrl_tx_buf[1]=0x1;//address
|
||||
ctrl_tx_buf[2]=(unsigned char)data_bytes;
|
||||
ctrl_tx_buf[3]=(unsigned char)(data_bytes>>8);
|
||||
ctrl_tx_buf[4]=0x01;//cmd
|
||||
memcpy(&ctrl_tx_buf[5],head,sizeof(COM_HEADER));//拷贝信息头
|
||||
memcpy(&ctrl_tx_buf[5+sizeof(COM_HEADER)],data,data_length);//拷贝数据
|
||||
ctrl_tx_buf[5+data_bytes]=cal_sum(ctrl_tx_buf,5+data_bytes);
|
||||
ctrl_tx_buf[6+data_bytes]=0x55;
|
||||
set_gpio_output(0,1);
|
||||
ret=SerialWrite(dev_fd,ctrl_tx_buf,7+data_bytes);
|
||||
//usleep(10000);
|
||||
set_gpio_output(0,0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
//控制数据重发
|
||||
int ctrl_data_retrans(void)
|
||||
{
|
||||
static mqd_t ctrl_tx_slave_mq=(mqd_t)-1;
|
||||
unsigned char dumy_msg[16];
|
||||
if(ctrl_tx_slave_mq==-1)
|
||||
{
|
||||
if((ctrl_tx_slave_mq= open_mq(CTRL_TX_MQ))==((mqd_t)-1))
|
||||
return -1;
|
||||
}
|
||||
if(mq_send(ctrl_tx_slave_mq,(const char *)dumy_msg,sizeof(dumy_msg),CTRL_MQ_PRIO)==-1)
|
||||
return -2;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void show_hex(unsigned char *buf,unsigned int len)
|
||||
{
|
||||
unsigned int i;
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
printf("0x%2x ",*buf++);
|
||||
if((i+1)%16==0)
|
||||
{
|
||||
printf("\r\n");
|
||||
}
|
||||
}
|
||||
printf("\r\n\r\n");
|
||||
}
|
||||
|
||||
|
||||
//获取IO输入状态
|
||||
unsigned int io_get(unsigned int i)
|
||||
{
|
||||
unsigned int val;
|
||||
lock_input_data();
|
||||
memcpy(&val,&my_input_data.io_input,sizeof(val));
|
||||
unlock_input_data();
|
||||
if((val&(1<<i))!=0)
|
||||
return ON;
|
||||
return OFF;
|
||||
}
|
||||
|
||||
|
||||
int get_pres_vol(unsigned int ch,float *fval)
|
||||
{
|
||||
lock_input_data();
|
||||
*fval=my_input_data.PresVolt[ch%5];
|
||||
unlock_input_data();
|
||||
return 0;
|
||||
}
|
||||
|
||||
//获取通道温度
|
||||
int get_temperature(unsigned int ch,float *fval)
|
||||
{
|
||||
if(ch>=5)
|
||||
return -1;
|
||||
if((my_input_data.work_state&(1<<ch))!=0)
|
||||
return -2;
|
||||
lock_input_data();
|
||||
*fval=my_input_data.temperature[ch%5];
|
||||
unlock_input_data();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
//电流转换成压力
|
||||
void CurrCnvToPres(float *raw_data,float *fval)
|
||||
{
|
||||
float temp;
|
||||
temp=(0.82846*(*raw_data))/3000;
|
||||
*fval=(0.2*temp-0.1);
|
||||
}
|
||||
|
||||
//获取电流通道压力
|
||||
void CurrCnvToPresEx(unsigned int ch,float *fval)
|
||||
{
|
||||
float temp;
|
||||
get_curr(ch,&temp);
|
||||
CurrCnvToPres(&temp,fval);
|
||||
}*/
|
||||
|
||||
//电压转换成压力
|
||||
/*/void VoltCnvToPres(unsigned int ch,float *fval)
|
||||
{
|
||||
if(fval!=NULL)
|
||||
*fval=(0.4*(*fval));
|
||||
}*/
|
||||
|
||||
//获取通道压力
|
||||
int VoltCnvToPresEx(unsigned int ch,float *fval)
|
||||
{
|
||||
float temp;
|
||||
get_pres_vol(ch,&temp);
|
||||
//VoltCnvToPres(&temp);
|
||||
if(fval!=NULL)
|
||||
*fval=(my_para_data.mach_run_para.pres_fac[ch].a)*temp+(my_para_data.mach_run_para.pres_fac[ch].b);
|
||||
//*fval=temp;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//获取通道压力
|
||||
int get_presure(unsigned int ch,float *fval)
|
||||
{
|
||||
if(ch>=5)
|
||||
return -1;
|
||||
//if((my_input_data.work_state&(1<<ch))!=0)
|
||||
// return -2;
|
||||
//lock_input_data();
|
||||
VoltCnvToPresEx(ch,fval);
|
||||
//unlock_input_data();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void relay_clr(unsigned int mask)
|
||||
{
|
||||
lock_output_data();
|
||||
my_output_data.relay_ctrl&=mask;
|
||||
unlock_output_data();
|
||||
ctrl_data_retrans();
|
||||
}
|
||||
|
||||
void set_man_out(unsigned int ch,unsigned int val)
|
||||
{
|
||||
lock_output_data();
|
||||
my_output_data.man_output[ch]=val;
|
||||
unlock_output_data();
|
||||
//ctrl_data_retrans();
|
||||
}
|
||||
|
||||
void set_pid_ch(unsigned int ch,unsigned int en_dis,unsigned int mode)
|
||||
{
|
||||
//unsigned int val;
|
||||
lock_output_data();
|
||||
ch=ch%4;
|
||||
if(my_output_data.pid_en[ch]!=en_dis)
|
||||
{
|
||||
if(mode)
|
||||
ctrl_data_retrans();
|
||||
}
|
||||
my_output_data.pid_en[ch]=en_dis;
|
||||
unlock_output_data();
|
||||
}
|
||||
|
||||
//设置目标温度
|
||||
void set_pid_temp(unsigned int ch,float *temp,unsigned int mode)
|
||||
{
|
||||
lock_output_data();
|
||||
ch&=3;
|
||||
my_output_data.temperature[ch]=*temp;
|
||||
if(mode)
|
||||
{
|
||||
ctrl_data_retrans();
|
||||
}
|
||||
unlock_output_data();
|
||||
}
|
||||
|
||||
void relay_set(unsigned int i,unsigned char val,unsigned int mode)
|
||||
{
|
||||
unsigned int tmp;
|
||||
unsigned int pos=(1<<i);
|
||||
int retrans_flg=0;
|
||||
if(i>31)
|
||||
return;
|
||||
lock_output_data();
|
||||
tmp=my_output_data.relay_ctrl;
|
||||
if(val!=OFF)//=ON
|
||||
{
|
||||
tmp|=pos;
|
||||
}
|
||||
else//=OFF
|
||||
{
|
||||
tmp&=(~pos);
|
||||
}
|
||||
if(tmp!=my_output_data.relay_ctrl)
|
||||
{
|
||||
my_output_data.relay_ctrl=tmp;
|
||||
retrans_flg=1;
|
||||
}
|
||||
unlock_output_data();
|
||||
if(retrans_flg)
|
||||
{
|
||||
//printf("relay=%x %x %x %x\n",my_output_data.relay_ctrl[0],my_output_data.relay_ctrl[1],my_output_data.relay_ctrl[2],my_output_data.relay_ctrl[3]);
|
||||
if(mode)
|
||||
ctrl_data_retrans();
|
||||
}
|
||||
//show_hex(my_output_data.relay_ctrl,8);
|
||||
}
|
||||
|
||||
void relay_set_all(unsigned int val,unsigned int mode)
|
||||
{
|
||||
unsigned int tmp;
|
||||
int retrans_flg=0;
|
||||
|
||||
lock_output_data();
|
||||
tmp=my_output_data.relay_ctrl;
|
||||
|
||||
if(tmp!=val)
|
||||
{
|
||||
my_output_data.relay_ctrl=val;
|
||||
retrans_flg=1;
|
||||
}
|
||||
unlock_output_data();
|
||||
if(retrans_flg)
|
||||
{
|
||||
if(mode)
|
||||
ctrl_data_retrans();
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int relay_get(unsigned int i,unsigned char *val)
|
||||
{
|
||||
unsigned int pos=(1<<i);
|
||||
unsigned int ret;
|
||||
lock_input_data();
|
||||
if((my_input_data.relay_state&pos)!=0)
|
||||
{
|
||||
ret=ON;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret=OFF;
|
||||
}
|
||||
if(val!=NULL)
|
||||
*val=ret;
|
||||
unlock_input_data();
|
||||
return ret;
|
||||
}
|
||||
|
||||
unsigned int relay_get_all(unsigned int *val)
|
||||
{
|
||||
unsigned int ret;
|
||||
lock_input_data();
|
||||
ret=my_input_data.relay_state;
|
||||
if(val!=NULL)
|
||||
*val=ret;
|
||||
unlock_input_data();
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ctrl_tx_routine(void *arg)
|
||||
{
|
||||
unsigned int send_index=0;
|
||||
unsigned int curr_timeout;
|
||||
|
||||
|
||||
if((ctrl_tx_mq=create_mq(CTRL_TX_MQ,CTRL_TX_MAX_MESSAGE,CTRL_TX_MESSAGE_SIZE))<0)
|
||||
{
|
||||
printf("create ctrl tx message queue failed\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
ctrl_tx_header.stNum=0;
|
||||
ctrl_tx_header.sqNum=0;
|
||||
while(1)
|
||||
{
|
||||
curr_timeout=timeout_curve[send_index%MAX_SEND_TIME_CURVE];
|
||||
if(recv_mq_wait(ctrl_tx_mq,(void *)ctrl_tx_mq_buf,sizeof(ctrl_tx_mq_buf),curr_timeout)>0)
|
||||
{
|
||||
//清空消息队列?
|
||||
++ctrl_tx_header.stNum;
|
||||
if(ctrl_tx_header.stNum==0)
|
||||
++ctrl_tx_header.stNum; //skip over 0
|
||||
ctrl_tx_header.sqNum = 0; //reset sqNum to 0 on each state change
|
||||
send_index=0;
|
||||
//show_time("tx");
|
||||
//printf("state change:stNum=%d sqNum=%d\r\n",ctrl_tx_header.stNum,ctrl_tx_header.sqNum);
|
||||
//LOG_DEBUG(COMUNICATION_TRACE_DEBUG,"state change:stNum=%d sqNum=%d\n",ctrl_tx_header.stNum,ctrl_tx_header.sqNum);
|
||||
usleep(10000);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(send_index<(MAX_SEND_TIME_CURVE-1))
|
||||
{
|
||||
send_index++;
|
||||
}
|
||||
++ctrl_tx_header.sqNum;
|
||||
//printf("stNum=%d sqNum=%d\n",ctrl_tx_head.stNum,ctrl_tx_head.sqNum);
|
||||
}
|
||||
//发送数据
|
||||
lock_output_data();
|
||||
memcpy(&my_output_data.pid_para[0],&my_para_data.mach_run_para.pid_type_def[PID_SPZ],sizeof(PID_TYPE_DEF));
|
||||
memcpy(&my_output_data.pid_para[1],&my_para_data.mach_run_para.pid_type_def[PID_LJ],sizeof(PID_TYPE_DEF));
|
||||
memcpy(&my_output_data.pid_para[2],&my_para_data.mach_run_para.pid_type_def[PID_SAMPLE],sizeof(PID_TYPE_DEF));
|
||||
my_output_data.temperature[TEMP_SPZ]=my_para_data.mach_run_para.temperature[TEMP_SPZ];
|
||||
my_output_data.temperature[TEMP_LJ]=my_para_data.mach_run_para.temperature[TEMP_LJ];
|
||||
my_output_data.temperature[TEMP_SAM]=my_para_data.mach_run_para.temperature[TEMP_SAM];
|
||||
//memcpy(my_output_data.pid_en,my_para_data.mach_run_para.pid_en,sizeof(my_output_data.pid_en));
|
||||
my_output_data.man_output[0]=(unsigned short)my_para_data.mach_run_para.volt_output[0];
|
||||
my_output_data.man_output[2]=0;
|
||||
my_output_data.man_output[3]=0;
|
||||
unlock_output_data();
|
||||
if(send_ctrl_frame(ctrl_fd,&ctrl_tx_header,&my_output_data,sizeof(my_output_data))<(sizeof(my_output_data)+7))
|
||||
{
|
||||
LOG_DEBUG(COMUNICATION_EEROR_DEBUG,"send data failed\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int process_message(unsigned char *msg_buf,unsigned int msg_length)
|
||||
{
|
||||
static unsigned int spz_index=0;
|
||||
//unsigned int i=0;
|
||||
unsigned int length;
|
||||
COM_HEADER received_header;
|
||||
if(msg_length<(7+sizeof(COM_HEADER)))
|
||||
return -1;
|
||||
if(msg_buf[0]!=0xAA)
|
||||
return -2;
|
||||
if(msg_buf[msg_length-1]!=0x55)
|
||||
return -3;
|
||||
length=(unsigned int)256*msg_buf[3]+msg_buf[2];
|
||||
if(length!=(msg_length-7))
|
||||
return -4;
|
||||
if(chk_sum(msg_buf,msg_length-2,msg_buf[msg_length-2])!=0)
|
||||
return -5;
|
||||
memcpy(&received_header,msg_buf+5,sizeof(COM_HEADER));
|
||||
if(received_header.stNum!=ctrl_rx_header.stNum)
|
||||
{
|
||||
//数据有变化
|
||||
//printf("state change stNum=%d sqNum=%d\n",received_header.stNum,received_header.sqNum);
|
||||
}
|
||||
else if(received_header.sqNum!=(ctrl_rx_header.sqNum+1))
|
||||
{
|
||||
//丢帧了
|
||||
printf("lost frame old_sq=%d new_sq=%d\n",ctrl_rx_header.sqNum,received_header.sqNum);
|
||||
}
|
||||
memcpy(&ctrl_rx_header,&received_header,sizeof(COM_HEADER));
|
||||
//获取信号量
|
||||
lock_input_data();
|
||||
//拷贝数据到全局缓冲
|
||||
memcpy(&my_input_data,&msg_buf[5+sizeof(COM_HEADER)],sizeof(my_input_data));
|
||||
//保存最近的色谱柱温度,用于分析温度是否稳定
|
||||
spz_index++;
|
||||
if((spz_index&3)==0)
|
||||
{
|
||||
save_spz_temp(&my_input_data.temperature[TEMP_SPZ]);
|
||||
}
|
||||
//printf("temp=%f %f %f %f pres=%f %f\n",my_input_data.temperature[0],my_input_data.temperature[1],my_input_data.temperature[2],my_input_data.temperature[3],my_input_data.PresVolt[6],my_input_data.Current[0]);
|
||||
//释放信号量
|
||||
unlock_input_data();
|
||||
//printf("io_input=0x%2x 0x%2x\n",my_input_data.io_input[0],my_input_data.io_input[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//接收控制MCU发送的信息,并存入共享内存
|
||||
void ctrl_rx_routine(void *arg)
|
||||
{
|
||||
|
||||
int curr_length,last_length,rx_length;
|
||||
int recv_error_tick=0;
|
||||
pthread_t ctrl_tx_thread;
|
||||
|
||||
rx_length=0; //本次接收的字节长度
|
||||
last_length=0;//上一次接收的字节长度
|
||||
//打开全局设备
|
||||
if((ctrl_fd=SerialOpen(CTRL_SERIAL_DEV,CTRL_SERIAL_SPEED))==-1)
|
||||
{
|
||||
LOG_DEBUG(COMUNICATION_EEROR_DEBUG,"open ctrl serial device failed\n");
|
||||
pthread_exit(1);
|
||||
}
|
||||
if((ctrl_tx_thread=task_create(ctrl_tx_routine,NULL,0,0))==-1)
|
||||
{
|
||||
LOG_DEBUG(COMUNICATION_EEROR_DEBUG,"create ctrl_tx_routine failed\n");
|
||||
close(ctrl_fd);
|
||||
pthread_exit(2);
|
||||
}
|
||||
my_input_data.com_flg=1;
|
||||
while(1)
|
||||
{
|
||||
usleep(30000);//wait 30ms
|
||||
curr_length=read(ctrl_fd,ctrl_rx_buf+rx_length,sizeof(ctrl_rx_buf)-rx_length);
|
||||
if(curr_length>0)
|
||||
{
|
||||
//存入缓冲区
|
||||
rx_length+=curr_length;
|
||||
last_length=curr_length;
|
||||
if(rx_length>=sizeof(ctrl_rx_buf))
|
||||
{
|
||||
//printf("code1=%d rx_length=%d\n",process_message(ctrl_rx_buf,rx_length),rx_length);//处理消息
|
||||
if(process_message(ctrl_rx_buf,rx_length)==0)
|
||||
{
|
||||
if(recv_error_tick>200)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"ctrl mcu recovery\n");
|
||||
}
|
||||
recv_error_tick=0;
|
||||
if(comunication_flg==0)
|
||||
{
|
||||
ysp_glb_data.MoDevConf.v.stVal=0;
|
||||
ysp_glb_data.MoDevConf.q=0;
|
||||
ysp_glb_data.MoDevConf.t.secs=(unsigned int)time(NULL);
|
||||
}
|
||||
comunication_flg=1;
|
||||
}
|
||||
rx_length=0;
|
||||
memset(ctrl_rx_buf,0,sizeof(ctrl_rx_buf));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(last_length>0)
|
||||
{
|
||||
//printf("code2=%d rx_length=%d\n",process_message(ctrl_rx_buf,rx_length),rx_length);//处理消息
|
||||
if(process_message(ctrl_rx_buf,rx_length)==0)
|
||||
{
|
||||
if(recv_error_tick>200)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"ctrl mcu recovery\n");
|
||||
}
|
||||
recv_error_tick=0;
|
||||
if(comunication_flg==0)
|
||||
{
|
||||
ysp_glb_data.MoDevConf.v.stVal=0;
|
||||
ysp_glb_data.MoDevConf.q=0;
|
||||
ysp_glb_data.MoDevConf.t.secs=time(NULL);
|
||||
}
|
||||
comunication_flg=1;
|
||||
}
|
||||
memset(ctrl_rx_buf,0,sizeof(ctrl_rx_buf));
|
||||
}
|
||||
else
|
||||
{
|
||||
//出错处理
|
||||
recv_error_tick++;
|
||||
if(recv_error_tick>256)
|
||||
{
|
||||
comunication_flg=0;
|
||||
if(recv_error_tick==257)
|
||||
{
|
||||
ysp_glb_data.MoDevConf.v.stVal=1;
|
||||
ysp_glb_data.MoDevConf.q=0;
|
||||
ysp_glb_data.MoDevConf.t.secs=(unsigned int)time(NULL);
|
||||
LOG_DEBUG(ERROR_DEBUG,"ctrl mcu lost\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
last_length=0;
|
||||
rx_length=0;
|
||||
}
|
||||
}
|
||||
//wait ctrl_tx_thread exit
|
||||
close(ctrl_fd);
|
||||
}
|
||||
|
||||
int ctrl_init(void)
|
||||
{
|
||||
pthread_t ctrl_rx_thread;
|
||||
if((ctrl_rx_thread=task_create(ctrl_rx_routine,NULL,0,0))==-1)
|
||||
{
|
||||
LOG_DEBUG(COMUNICATION_EEROR_DEBUG,"create ctrl_tx_routine failed\n");
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,39 @@
|
||||
#ifndef _CTRL_PROCESS_H
|
||||
#define _CTRL_PROCESS_H
|
||||
|
||||
|
||||
extern int get_spz_stable(float *delt);
|
||||
|
||||
extern int ctrl_data_retrans(void);
|
||||
|
||||
extern unsigned int io_get(unsigned int i);
|
||||
|
||||
/*extern void get_curr(unsigned int ch,float *fval);*/
|
||||
|
||||
extern int get_pres_vol(unsigned int ch,float *fval);
|
||||
|
||||
extern int get_temperature(unsigned int ch,float *fval);
|
||||
extern int get_presure(unsigned int ch,float *fval);
|
||||
|
||||
//extern void CurrCnvToPres(float *raw_data,float *fval);
|
||||
|
||||
//extern void CurrCnvToPresEx(unsigned int ch,float *fval);
|
||||
|
||||
extern void VoltCnvToPres(float *fval);
|
||||
|
||||
extern int VoltCnvToPresEx(unsigned int ch,float *fval);
|
||||
|
||||
extern void relay_clr(unsigned int mask);
|
||||
|
||||
extern void set_pid_ch(unsigned int ch,unsigned int en_dis,unsigned int mode);
|
||||
|
||||
extern void set_pid_temp(unsigned int ch,float *temp,unsigned int mode);
|
||||
|
||||
extern void relay_set(unsigned int i,unsigned char val,unsigned int mode);
|
||||
extern unsigned int relay_get(unsigned int i,unsigned char *val);
|
||||
extern int ctrl_init(void);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -0,0 +1,283 @@
|
||||
#include "sqlite3.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "common.h"
|
||||
|
||||
#define MY_DATABASE "ysp.db"
|
||||
|
||||
#define CREATE_TBL_CMD "CREATE TABLE IF NOT EXISTS his_tbl(H2 FLOAT,CO FLOAT,\
|
||||
CH4 FLOAT,C2H4 FLOAT,C2H6 FLOAT,C2H2 FLOAT,TotHyd FLOAT,SmpTm INTEGER,CO2 FLOAT,\
|
||||
H2O FLOAT,OilTmp FLOAT,findmask INTEGER,H2_s INTEGER,H2_p INTEGER,\
|
||||
CO_s INTEGER,CO_p INTEGER,CH4_s INTEGER,CH4_p INTEGER,C2H4_s INTEGER,C2H4_p INTEGER,\
|
||||
C2H6_s INTEGER,C2H6_p INTEGER,C2H2_s INTEGER,C2H2_p INTEGER,\
|
||||
H2_A FLOAT,CO_A FLOAT,CH4_A FLOAT,C2H4_A FLOAT,C2H6_A FLOAT,C2H2_A FLOAT,\
|
||||
spzT_s FLOAT,spzT_e FLOAT,samT_s FLOAT,samT_e FLOAT,pres FLOAT,logTime TIMESTAMP)"
|
||||
|
||||
|
||||
//获取数据库连接
|
||||
//SQLITE_OPEN_READONLY,
|
||||
sqlite3 *db_get(int flags)
|
||||
{
|
||||
sqlite3 *db;
|
||||
int rc;
|
||||
sqlite3_initialize();
|
||||
if((rc=sqlite3_open_v2(MY_DATABASE,&db,flags,NULL))!=SQLITE_OK)
|
||||
{
|
||||
if((rc=sqlite3_open_v2(MY_DATABASE,&db,flags,NULL))!=SQLITE_OK)
|
||||
{
|
||||
printf("failed to open db\n");
|
||||
sqlite3_shutdown();
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
return db;
|
||||
}
|
||||
|
||||
//关闭数据库连接
|
||||
void db_close(sqlite3 *db,sqlite3_stmt *stmt)
|
||||
{
|
||||
if(stmt)
|
||||
sqlite3_finalize(stmt);
|
||||
if(db)
|
||||
sqlite3_close(db);
|
||||
sqlite3_shutdown();
|
||||
}
|
||||
|
||||
|
||||
//数据库执行sql查询
|
||||
sqlite3_stmt *db_query(sqlite3 *db,const char *sqlcmd)
|
||||
{
|
||||
int rc;
|
||||
sqlite3_stmt *stmt;
|
||||
if((rc=sqlite3_prepare_v2(db,sqlcmd,strlen(sqlcmd),&stmt,NULL))!=SQLITE_OK)
|
||||
{
|
||||
printf("failed to prepare:%s\n",sqlite3_errmsg(db));
|
||||
db_close(db,stmt);
|
||||
return NULL;
|
||||
}
|
||||
return stmt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int all_table_init(void)
|
||||
{
|
||||
sqlite3 *db;
|
||||
sqlite3_stmt *stmt;
|
||||
char sqlcmd[1024];
|
||||
int rc;
|
||||
|
||||
if((db=db_get(SQLITE_OPEN_READWRITE))==NULL)
|
||||
return -1;
|
||||
strcpy(sqlcmd,CREATE_TBL_CMD);
|
||||
if((stmt=db_query(db,sqlcmd))==NULL)
|
||||
return -2;
|
||||
rc = sqlite3_step(stmt);
|
||||
if(rc!=SQLITE_DONE)
|
||||
{
|
||||
printf("all_table_init failed to step:%s\r\n",sqlite3_errmsg(db));
|
||||
db_close(db,stmt);
|
||||
return -3;
|
||||
}
|
||||
db_close(db,stmt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int log_entry_add(char *str,int len)
|
||||
{
|
||||
sqlite3 *db;
|
||||
sqlite3_stmt *stmt;
|
||||
char sqlcmd[256];
|
||||
int rc;
|
||||
|
||||
if((str==NULL))
|
||||
return -1;
|
||||
|
||||
if((db=db_get(SQLITE_OPEN_READWRITE))==NULL)
|
||||
return -2;
|
||||
|
||||
//sprintf(sqlcmd,"INSERT INTO log_tbl VALUES(?,datetime())");
|
||||
sprintf(sqlcmd,"INSERT OR REPLACE INTO log_tbl VALUES(?,datetime())");
|
||||
if((stmt=db_query(db,sqlcmd))==NULL)
|
||||
return -3;
|
||||
|
||||
if(len!=0)
|
||||
sqlite3_bind_text(stmt,1,str,len,NULL);
|
||||
else
|
||||
sqlite3_bind_text(stmt,1,str,strlen(str),NULL);
|
||||
|
||||
rc = sqlite3_step(stmt);
|
||||
if(rc!=SQLITE_DONE)
|
||||
{
|
||||
printf("log_entry_add failed to step:%s\r\n",sqlite3_errmsg(db));
|
||||
db_close(db,stmt);
|
||||
return -4;
|
||||
}
|
||||
db_close(db,stmt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int his_entry_add(ANALY_RESULT *str)
|
||||
{
|
||||
sqlite3 *db;
|
||||
sqlite3_stmt *stmt;
|
||||
char sqlcmd[256];
|
||||
int rc;
|
||||
|
||||
if((str==NULL))
|
||||
return -1;
|
||||
|
||||
if((db=db_get(SQLITE_OPEN_READWRITE))==NULL)
|
||||
return -2;
|
||||
|
||||
sprintf(sqlcmd,"INSERT OR REPLACE INTO his_tbl VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,datetime())");
|
||||
if((stmt=db_query(db,sqlcmd))==NULL)
|
||||
return -3;
|
||||
sqlite3_bind_double(stmt,1,(double)str->result.H2ppm);
|
||||
sqlite3_bind_double(stmt,2,(double)str->result.COppm);
|
||||
sqlite3_bind_double(stmt,3,(double)str->result.CH4ppm);
|
||||
sqlite3_bind_double(stmt,4,(double)str->result.C2H4ppm);
|
||||
sqlite3_bind_double(stmt,5,(double)str->result.C2H6ppm);
|
||||
sqlite3_bind_double(stmt,6,(double)str->result.C2H2ppm);
|
||||
sqlite3_bind_double(stmt,7,(double)str->result.TotHyd);
|
||||
sqlite3_bind_int(stmt,8,str->result.SmpTm);
|
||||
sqlite3_bind_double(stmt,9,(double)str->result.CO2ppm);
|
||||
sqlite3_bind_double(stmt,10,(double)str->result.Mst);
|
||||
sqlite3_bind_double(stmt,11,(double)str->result.temp);
|
||||
sqlite3_bind_int(stmt,12,str->find_mask);
|
||||
sqlite3_bind_int(stmt,13,str->pos_info[0].start);
|
||||
sqlite3_bind_int(stmt,14,str->pos_info[0].peak);
|
||||
sqlite3_bind_int(stmt,15,str->pos_info[1].start);
|
||||
sqlite3_bind_int(stmt,16,str->pos_info[1].peak);
|
||||
sqlite3_bind_int(stmt,17,str->pos_info[2].start);
|
||||
sqlite3_bind_int(stmt,18,str->pos_info[2].peak);
|
||||
sqlite3_bind_int(stmt,19,str->pos_info[3].start);
|
||||
sqlite3_bind_int(stmt,20,str->pos_info[3].peak);
|
||||
sqlite3_bind_int(stmt,21,str->pos_info[4].start);
|
||||
sqlite3_bind_int(stmt,22,str->pos_info[4].peak);
|
||||
sqlite3_bind_int(stmt,23,str->pos_info[5].start);
|
||||
sqlite3_bind_int(stmt,24,str->pos_info[5].peak);
|
||||
sqlite3_bind_double(stmt,25,(double)str->area[0]);
|
||||
sqlite3_bind_double(stmt,26,(double)str->area[1]);
|
||||
sqlite3_bind_double(stmt,27,(double)str->area[2]);
|
||||
sqlite3_bind_double(stmt,28,(double)str->area[3]);
|
||||
sqlite3_bind_double(stmt,29,(double)str->area[4]);
|
||||
sqlite3_bind_double(stmt,30,(double)str->area[5]);
|
||||
sqlite3_bind_double(stmt,31,(double)str->spzTemp1);
|
||||
sqlite3_bind_double(stmt,32,(double)str->spzTemp2);
|
||||
sqlite3_bind_double(stmt,33,(double)str->samTemp1);
|
||||
sqlite3_bind_double(stmt,34,(double)str->samTemp2);
|
||||
sqlite3_bind_double(stmt,35,(double)str->pres);
|
||||
rc = sqlite3_step(stmt);
|
||||
if(rc!=SQLITE_DONE)
|
||||
{
|
||||
printf("his_entry_add failed to step:%s\r\n",sqlite3_errmsg(db));
|
||||
db_close(db,stmt);
|
||||
return -4;
|
||||
}
|
||||
db_close(db,stmt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int his_entry_read(ANALY_RESULT *str)
|
||||
{
|
||||
sqlite3 *db;
|
||||
sqlite3_stmt *stmt;
|
||||
char sqlcmd[256];
|
||||
int rc;
|
||||
|
||||
if((str==NULL))
|
||||
return -1;
|
||||
|
||||
if((db=db_get(SQLITE_OPEN_READONLY))==NULL)
|
||||
return -2;
|
||||
|
||||
sprintf(sqlcmd,"SELECT * FROM his_tbl order by SmpTm desc limit 1 offset 0");
|
||||
if((stmt=db_query(db,sqlcmd))==NULL)
|
||||
return -3;
|
||||
rc = sqlite3_step(stmt);
|
||||
if(rc==SQLITE_ROW)
|
||||
{
|
||||
str->result.H2ppm=(float)sqlite3_column_double(stmt,0);
|
||||
str->result.COppm=(float)sqlite3_column_double(stmt,1);
|
||||
str->result.CH4ppm=(float)sqlite3_column_double(stmt,2);
|
||||
str->result.C2H4ppm=(float)sqlite3_column_double(stmt,3);
|
||||
str->result.C2H6ppm=(float)sqlite3_column_double(stmt,4);
|
||||
str->result.C2H2ppm=(float)sqlite3_column_double(stmt,5);
|
||||
str->result.TotHyd=(float)sqlite3_column_double(stmt,6);
|
||||
str->result.SmpTm=sqlite3_column_int(stmt,7);
|
||||
str->result.CO2ppm=(float)sqlite3_column_double(stmt,8);
|
||||
str->result.Mst=(float)sqlite3_column_double(stmt,9);
|
||||
str->result.temp=(float)sqlite3_column_double(stmt,10);
|
||||
str->find_mask=sqlite3_column_int(stmt,11);
|
||||
str->pos_info[0].start=sqlite3_column_int(stmt,12);
|
||||
str->pos_info[0].peak=sqlite3_column_int(stmt,13);
|
||||
str->pos_info[1].start=sqlite3_column_int(stmt,14);
|
||||
str->pos_info[1].peak=sqlite3_column_int(stmt,15);
|
||||
str->pos_info[2].start=sqlite3_column_int(stmt,16);
|
||||
str->pos_info[2].peak=sqlite3_column_int(stmt,17);
|
||||
str->pos_info[3].start=sqlite3_column_int(stmt,18);
|
||||
str->pos_info[3].peak=sqlite3_column_int(stmt,19);
|
||||
str->pos_info[4].start=sqlite3_column_int(stmt,20);
|
||||
str->pos_info[4].peak=sqlite3_column_int(stmt,21);
|
||||
str->pos_info[5].start=sqlite3_column_int(stmt,22);
|
||||
str->pos_info[5].peak=sqlite3_column_int(stmt,23);
|
||||
str->area[0]=(float)sqlite3_column_double(stmt,24);
|
||||
str->area[1]=(float)sqlite3_column_double(stmt,25);
|
||||
str->area[2]=(float)sqlite3_column_double(stmt,26);
|
||||
str->area[3]=(float)sqlite3_column_double(stmt,27);
|
||||
str->area[4]=(float)sqlite3_column_double(stmt,28);
|
||||
str->area[5]=(float)sqlite3_column_double(stmt,29);
|
||||
str->spzTemp1=(float)sqlite3_column_double(stmt,30);
|
||||
str->spzTemp2=(float)sqlite3_column_double(stmt,31);
|
||||
str->samTemp1=(float)sqlite3_column_double(stmt,32);
|
||||
str->samTemp2=(float)sqlite3_column_double(stmt,33);
|
||||
str->pres=(float)sqlite3_column_double(stmt,34);
|
||||
db_close(db,stmt);
|
||||
return 0;
|
||||
}
|
||||
db_close(db,stmt);
|
||||
return -4;
|
||||
}
|
||||
/*
|
||||
char *database_format_time(time_t t)
|
||||
{
|
||||
static char time_str_arr[32];
|
||||
//sprintf(time_str_arr,"%02d");
|
||||
strftime(char *ptr,size_t maxsize,const char *format,const struct tm *timeptr );
|
||||
}*/
|
||||
/*
|
||||
世纪秒转日期字符串
|
||||
SELECT datetime(1377168853,'unixepoch','localtime');
|
||||
日期字符串转世纪秒
|
||||
SELECT strftime('%s','now');
|
||||
*/
|
||||
int data_entry_remove(char *tb_name,time_t rsv_time)
|
||||
{
|
||||
sqlite3 *db;
|
||||
sqlite3_stmt *stmt;
|
||||
char sqlcmd[256];
|
||||
int rc;
|
||||
|
||||
if((tb_name==NULL))
|
||||
return -1;
|
||||
|
||||
if((db=db_get(SQLITE_OPEN_READWRITE))==NULL)
|
||||
return -2;
|
||||
|
||||
sprintf(sqlcmd,"DELETE FROM %s where logTime<datetime(%d,'unixepoch','localtime')",tb_name,(unsigned int)(time(NULL)-rsv_time));
|
||||
if((stmt=db_query(db,sqlcmd))==NULL)
|
||||
return -3;
|
||||
|
||||
rc = sqlite3_step(stmt);
|
||||
if(rc!=SQLITE_DONE)
|
||||
{
|
||||
printf("data_entry_remove failed to step:%s\r\n",sqlite3_errmsg(db));
|
||||
db_close(db,stmt);
|
||||
return -4;
|
||||
}
|
||||
db_close(db,stmt);
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
#ifndef _DATA_BASE_H
|
||||
#define _DATA_BASE_H
|
||||
|
||||
#include "sqlite3.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
sqlite3 *db_get(int flags);
|
||||
sqlite3_stmt *db_query(sqlite3 *db,const char *sqlcmd);
|
||||
void db_close(sqlite3 *db,sqlite3_stmt *stmt);
|
||||
|
||||
int log_entry_add(char *str,int len);
|
||||
|
||||
#endif
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
while true
|
||||
do
|
||||
echo -n "now start remove old file!"
|
||||
find /COMTRADE -mtime +180 -type f -exec rm -f {} \;
|
||||
sleep 604800
|
||||
done
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,178 @@
|
||||
#include "common.h"
|
||||
#include <stdlib.h>
|
||||
#include "thread.h"
|
||||
#include <pthread.h>
|
||||
#include "msq.h"
|
||||
#include "serial.h"
|
||||
#include "ysp_debug.h"
|
||||
#include "scl_shm.h"
|
||||
#include "iec61850_process.h"
|
||||
|
||||
mqd_t iec61850_rx_mq;//
|
||||
SCL_MSG_TYPE recv_iec_msg;
|
||||
static char iec61850_rx_buf[1024];
|
||||
|
||||
|
||||
static YSP_PRI_DATA ysp_pri_data;
|
||||
//static YSP_IEC_DATA ysp_last_data;
|
||||
|
||||
|
||||
int iec61850_send_msg(void *msg,int msg_len)
|
||||
{
|
||||
static mqd_t iec61850_rx_slave_mq=(mqd_t)-1;
|
||||
if(iec61850_rx_slave_mq==-1)
|
||||
{
|
||||
if((iec61850_rx_slave_mq= open_mq(IEC61850_RX_MQ))==((mqd_t)-1))
|
||||
return -1;
|
||||
}
|
||||
if(mq_send(iec61850_rx_slave_mq,(const char *)msg,msg_len,IEC61850_RX_MQ_PRIO)==-1)
|
||||
return -2;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int send_ysp_msg(YSP_PRI_DATA *ysp_pri)
|
||||
{
|
||||
static unsigned char ysp_msg_buf[512];
|
||||
unsigned int cmd;
|
||||
cmd=CMD_SEND_PRI_DATA;
|
||||
memcpy(ysp_msg_buf,&cmd,sizeof(cmd));
|
||||
memcpy(&ysp_msg_buf[4],(const void *)ysp_pri,sizeof(YSP_PRI_DATA));
|
||||
return iec61850_send_msg(ysp_msg_buf,sizeof(YSP_PRI_DATA)+4);
|
||||
}
|
||||
|
||||
|
||||
void conv_pri2iec(YSP_PRI_DATA *ysp_pri,YSP_IEC_DATA *ysp_iec,unsigned int q,time_t smp_time)
|
||||
{
|
||||
time_t t;
|
||||
if(smp_time!=0)
|
||||
t=smp_time;
|
||||
else
|
||||
t=ysp_pri->SmpTm;
|
||||
|
||||
ysp_iec->H2ppm.v.f=ysp_pri->H2ppm;
|
||||
ysp_iec->H2ppm.q=q;
|
||||
ysp_iec->H2ppm.t.secs=t;
|
||||
|
||||
ysp_iec->COppm.v.f=ysp_pri->COppm;
|
||||
ysp_iec->COppm.q=q;
|
||||
ysp_iec->COppm.t.secs=t;
|
||||
|
||||
ysp_iec->CH4ppm.v.f=ysp_pri->CH4ppm;
|
||||
ysp_iec->CH4ppm.q=q;
|
||||
ysp_iec->CH4ppm.t.secs=t;
|
||||
|
||||
ysp_iec->C2H4ppm.v.f=ysp_pri->C2H4ppm;
|
||||
ysp_iec->C2H4ppm.q=q;
|
||||
ysp_iec->C2H4ppm.t.secs=t;
|
||||
|
||||
ysp_iec->C2H6ppm.v.f=ysp_pri->C2H6ppm;
|
||||
ysp_iec->C2H6ppm.q=q;
|
||||
ysp_iec->C2H6ppm.t.secs=t;
|
||||
|
||||
ysp_iec->C2H2ppm.v.f=ysp_pri->C2H2ppm;
|
||||
ysp_iec->C2H2ppm.q=q;
|
||||
ysp_iec->C2H2ppm.t.secs=t;
|
||||
|
||||
ysp_iec->TotHyd.v.f=ysp_pri->TotHyd;//(ysp_pri->CH4ppm)+(ysp_pri->C2H4ppm)+(ysp_pri->C2H6ppm)+(ysp_pri->C2H2ppm);
|
||||
ysp_iec->TotHyd.q=q;
|
||||
ysp_iec->TotHyd.t.secs=t;
|
||||
|
||||
ysp_iec->SmpTm.v.i=t;
|
||||
ysp_iec->SmpTm.q=q;
|
||||
ysp_iec->SmpTm.t.secs=t;
|
||||
|
||||
ysp_iec->CO2ppm.v.f=ysp_pri->CO2ppm;
|
||||
if(co2_is_ok)
|
||||
{
|
||||
ysp_iec->CO2ppm.q=GOOD;
|
||||
}
|
||||
else
|
||||
{
|
||||
ysp_iec->CO2ppm.q=INVALID;
|
||||
}
|
||||
ysp_iec->CO2ppm.t.secs=t;
|
||||
}
|
||||
|
||||
void iec61850_rx_routine(void *arg)
|
||||
{
|
||||
int i;
|
||||
time_t now;
|
||||
float f=0;
|
||||
start_scl_mem();
|
||||
if((iec61850_rx_mq=create_mq(IEC61850_RX_MQ,IEC61850_RX_MAX_MESSAGE,IEC61850_RX_MESSAGE_SIZE))<0)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"create iec61850 rx message queue failed\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
while(1)
|
||||
{
|
||||
if(recv_mq_wait(iec61850_rx_mq,(void *)iec61850_rx_buf,sizeof(iec61850_rx_buf),1000000)>0)
|
||||
{
|
||||
memcpy(&recv_iec_msg,iec61850_rx_buf,sizeof(recv_iec_msg));
|
||||
switch(recv_iec_msg.cmd)
|
||||
{
|
||||
case CMD_SEND_PRI_DATA:
|
||||
LOG_DEBUG(IEC61850_TRACE_DEBUG,"receive CMD_SEND_PRI_DATA\n");
|
||||
memcpy(&ysp_pri_data,&iec61850_rx_buf[4],sizeof(YSP_PRI_DATA));
|
||||
now=time(NULL);
|
||||
conv_pri2iec(&ysp_pri_data,&ysp_glb_data,0,0);
|
||||
lock_scl_mem();
|
||||
put_mv_data(0,0,(USR_MV *)&ysp_glb_data,sizeof(ysp_glb_data)/sizeof(USR_MV));
|
||||
unlock_scl_mem();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
now=time(NULL);
|
||||
lock_input_data();
|
||||
ysp_glb_data.Tmp.v.f=my_input_data.temp;
|
||||
ysp_glb_data.Mst.v.f=my_input_data.water;
|
||||
if(my_input_data.com_flg)
|
||||
{
|
||||
ysp_glb_data.Tmp.q=INVALID;
|
||||
ysp_glb_data.Mst.q=INVALID;
|
||||
}
|
||||
else
|
||||
{
|
||||
ysp_glb_data.Tmp.q=GOOD;
|
||||
ysp_glb_data.Mst.q=GOOD;
|
||||
}
|
||||
unlock_input_data();
|
||||
|
||||
get_presure(PRES_PA1,&ysp_glb_data.GasPres.v.f);
|
||||
conv_pri2iec(&ysp_pri_data,&ysp_glb_data,0,0);
|
||||
ysp_glb_data.Tmp.t.secs=now;
|
||||
ysp_glb_data.Mst.t.secs=now;
|
||||
ysp_glb_data.GasPres.t.secs=now;
|
||||
if(ysp_glb_data.MoDevConf.v.stVal)
|
||||
{
|
||||
ysp_glb_data.MoDevConf.q=INVALID;
|
||||
}
|
||||
else
|
||||
{
|
||||
ysp_glb_data.MoDevConf.q=GOOD;
|
||||
}
|
||||
lock_scl_mem();
|
||||
put_mv_data(0,0,(USR_MV *)&ysp_glb_data,sizeof(ysp_glb_data)/sizeof(USR_MV));
|
||||
unlock_scl_mem();
|
||||
}
|
||||
}
|
||||
stop_scl_mem();
|
||||
}
|
||||
|
||||
|
||||
int iec61850_rx_init(void)
|
||||
{
|
||||
pthread_t iec61850_rx_thread;
|
||||
if((iec61850_rx_thread=task_create(iec61850_rx_routine,NULL,0,0))==-1)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"create iec61850_rx_routine failed\n");
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
#ifndef _IEC61850_PROCESS_H
|
||||
#define _IEC61850_PROCESS_H
|
||||
|
||||
#include "scl_shm.h"
|
||||
|
||||
|
||||
#define IEC61850_RX_MQ "/iec_rx_mq"
|
||||
#define IEC61850_RX_MAX_MESSAGE 32
|
||||
#define IEC61850_RX_MESSAGE_SIZE 1024
|
||||
#define IEC61850_RX_MQ_PRIO 31
|
||||
|
||||
|
||||
#define CMD_SEND_PRI_DATA 16
|
||||
|
||||
extern int iec61850_rx_init(void);
|
||||
extern int iec61850_send_msg(void *msg,int msg_len);
|
||||
|
||||
#endif
|
@ -0,0 +1,26 @@
|
||||
# Configure Loopback
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
#auto eth0
|
||||
#iface eth0 inet dhcp
|
||||
|
||||
#iface eth1 inet manual
|
||||
# pre-up ifconfig $IFACE up
|
||||
# pre-down ifconfig $IFACE down
|
||||
auto eth0
|
||||
iface eth0 inet static
|
||||
address 192.168.1.199
|
||||
netmask 255.255.255.0
|
||||
network 192.168.1.0
|
||||
gateway 192.168.1.1
|
||||
|
||||
auto eth1
|
||||
iface eth1 inet static
|
||||
address 192.169.1.199
|
||||
netmask 255.255.255.0
|
||||
network 192.169.1.0
|
||||
gateway 192.169.1.1
|
||||
|
||||
|
||||
|
@ -0,0 +1,3 @@
|
||||
1.数据库表设计
|
||||
2.数据上送规则设计
|
||||
3.调试接口
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,16 @@
|
||||
/*
|
||||
* main.h
|
||||
*
|
||||
* Created on: Apr 15, 2015
|
||||
* Author: root
|
||||
*/
|
||||
|
||||
#ifndef MAIN_H_
|
||||
#define MAIN_H_
|
||||
|
||||
#define MAIN_MESSAGE_MQ "/main_mq"
|
||||
#define MAIN_MAX_MESSAGE 8
|
||||
#define MAIN_MESSAGE_SIZE 1024
|
||||
#define MAIN_MESSAGE_PRIO 30
|
||||
|
||||
#endif /* MAIN_H_ */
|
@ -0,0 +1,31 @@
|
||||
/* Glue functions for the minIni library, based on the C/C++ stdio library
|
||||
*
|
||||
* Or better said: this file contains macros that maps the function interface
|
||||
* used by minIni to the standard C/C++ file I/O functions.
|
||||
*
|
||||
* By CompuPhase, 2008-2012
|
||||
* This "glue file" is in the public domain. It is distributed without
|
||||
* warranties or conditions of any kind, either express or implied.
|
||||
*/
|
||||
|
||||
/* map required file I/O types and functions to the standard C library */
|
||||
#include <stdio.h>
|
||||
|
||||
#define INI_FILETYPE FILE*
|
||||
#define ini_openread(filename,file) ((*(file) = fopen((filename),"rb")) != NULL)
|
||||
#define ini_openwrite(filename,file) ((*(file) = fopen((filename),"wb")) != NULL)
|
||||
#define ini_close(file) (fclose(*(file)) == 0)
|
||||
#define ini_read(buffer,size,file) (fgets((buffer),(size),*(file)) != NULL)
|
||||
#define ini_write(buffer,file) (fputs((buffer),*(file)) >= 0)
|
||||
#define ini_rename(source,dest) (rename((source), (dest)) == 0)
|
||||
#define ini_remove(filename) (remove(filename) == 0)
|
||||
|
||||
#define INI_FILEPOS fpos_t
|
||||
#define ini_tell(file,pos) (fgetpos(*(file), (pos)) == 0)
|
||||
#define ini_seek(file,pos) (fsetpos(*(file), (pos)) == 0)
|
||||
|
||||
|
||||
/* for floating-point support, define additional types and functions */
|
||||
#define INI_REAL float
|
||||
#define ini_ftoa(string,value) sprintf((string),"%f",(value))
|
||||
#define ini_atof(string) (INI_REAL)strtod((string),NULL)
|
@ -0,0 +1,831 @@
|
||||
/* minIni - Multi-Platform INI file parser, suitable for embedded systems
|
||||
*
|
||||
* These routines are in part based on the article "Multiplatform .INI Files"
|
||||
* by Joseph J. Graf in the March 1994 issue of Dr. Dobb's Journal.
|
||||
*
|
||||
* Copyright (c) CompuPhase, 2008-2012
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Version: $Id: minIni.c 45 2012-05-14 11:53:09Z thiadmer.riemersma $
|
||||
*/
|
||||
|
||||
#if (defined _UNICODE || defined __UNICODE__ || defined UNICODE) && !defined MININI_ANSI
|
||||
# if !defined UNICODE /* for Windows */
|
||||
# define UNICODE
|
||||
# endif
|
||||
# if !defined _UNICODE /* for C library */
|
||||
# define _UNICODE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define MININI_IMPLEMENTATION
|
||||
#include "minIni.h"
|
||||
#if defined NDEBUG
|
||||
#define assert(e)
|
||||
#else
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
#if !defined __T
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#define TCHAR char
|
||||
#define __T(s) s
|
||||
#define _tcscat strcat
|
||||
#define _tcschr strchr
|
||||
#define _tcscmp strcmp
|
||||
#define _tcscpy strcpy
|
||||
#define _tcsicmp stricmp
|
||||
#define _tcslen strlen
|
||||
#define _tcsncmp strncmp
|
||||
#define _tcsnicmp strnicmp
|
||||
#define _tcsrchr strrchr
|
||||
#define _tcstol strtol
|
||||
#define _tcstod strtod
|
||||
#define _totupper toupper
|
||||
#define _stprintf sprintf
|
||||
#define _tfgets fgets
|
||||
#define _tfputs fputs
|
||||
#define _tfopen fopen
|
||||
#define _tremove remove
|
||||
#define _trename rename
|
||||
#endif
|
||||
|
||||
#if defined __linux || defined __linux__
|
||||
#define __LINUX__
|
||||
#elif defined FREEBSD && !defined __FreeBSD__
|
||||
#define __FreeBSD__
|
||||
#elif defined(_MSC_VER)
|
||||
#pragma warning(disable: 4996) /* for Microsoft Visual C/C++ */
|
||||
#endif
|
||||
#if !defined strnicmp && !defined PORTABLE_STRNICMP
|
||||
#if defined __LINUX__ || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
|
||||
#define strnicmp strncasecmp
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined INI_LINETERM
|
||||
#define INI_LINETERM __T("\n")
|
||||
#endif
|
||||
#if !defined INI_FILETYPE
|
||||
#error Missing definition for INI_FILETYPE.
|
||||
#endif
|
||||
|
||||
#if !defined sizearray
|
||||
#define sizearray(a) (sizeof(a) / sizeof((a)[0]))
|
||||
#endif
|
||||
|
||||
enum quote_option {
|
||||
QUOTE_NONE,
|
||||
QUOTE_ENQUOTE,
|
||||
QUOTE_DEQUOTE,
|
||||
};
|
||||
|
||||
#if defined PORTABLE_STRNICMP
|
||||
int strnicmp(const TCHAR *s1, const TCHAR *s2, size_t n)
|
||||
{
|
||||
register int c1, c2;
|
||||
|
||||
while (n-- != 0 && (*s1 || *s2)) {
|
||||
c1 = *s1++;
|
||||
if ('a' <= c1 && c1 <= 'z')
|
||||
c1 += ('A' - 'a');
|
||||
c2 = *s2++;
|
||||
if ('a' <= c2 && c2 <= 'z')
|
||||
c2 += ('A' - 'a');
|
||||
if (c1 != c2)
|
||||
return c1 - c2;
|
||||
} /* while */
|
||||
return 0;
|
||||
}
|
||||
#endif /* PORTABLE_STRNICMP */
|
||||
|
||||
static TCHAR *skipleading(const TCHAR *str)
|
||||
{
|
||||
assert(str != NULL);
|
||||
while (*str != '\0' && *str <= ' ')
|
||||
str++;
|
||||
return (TCHAR *)str;
|
||||
}
|
||||
|
||||
static TCHAR *skiptrailing(const TCHAR *str, const TCHAR *base)
|
||||
{
|
||||
assert(str != NULL);
|
||||
assert(base != NULL);
|
||||
while (str > base && *(str-1) <= ' ')
|
||||
str--;
|
||||
return (TCHAR *)str;
|
||||
}
|
||||
|
||||
static TCHAR *striptrailing(TCHAR *str)
|
||||
{
|
||||
TCHAR *ptr = skiptrailing(_tcschr(str, '\0'), str);
|
||||
assert(ptr != NULL);
|
||||
*ptr = '\0';
|
||||
return str;
|
||||
}
|
||||
|
||||
static TCHAR *save_strncpy(TCHAR *dest, const TCHAR *source, size_t maxlen, enum quote_option option)
|
||||
{
|
||||
size_t d, s;
|
||||
|
||||
assert(maxlen>0);
|
||||
assert(dest <= source || dest >= source + maxlen);
|
||||
if (option == QUOTE_ENQUOTE && maxlen < 3)
|
||||
option = QUOTE_NONE; /* cannot store two quotes and a terminating zero in less than 3 characters */
|
||||
|
||||
switch (option) {
|
||||
case QUOTE_NONE:
|
||||
for (d = 0; d < maxlen - 1 && source[d] != '\0'; d++)
|
||||
dest[d] = source[d];
|
||||
assert(d < maxlen);
|
||||
dest[d] = '\0';
|
||||
break;
|
||||
case QUOTE_ENQUOTE:
|
||||
d = 0;
|
||||
dest[d++] = '"';
|
||||
for (s = 0; source[s] != '\0' && d < maxlen - 2; s++, d++) {
|
||||
if (source[s] == '"') {
|
||||
if (d >= maxlen - 3)
|
||||
break; /* no space to store the escape character plus the one that follows it */
|
||||
dest[d++] = '\\';
|
||||
} /* if */
|
||||
dest[d] = source[s];
|
||||
} /* for */
|
||||
dest[d++] = '"';
|
||||
dest[d] = '\0';
|
||||
break;
|
||||
case QUOTE_DEQUOTE:
|
||||
for (d = s = 0; source[s] != '\0' && d < maxlen - 1; s++, d++) {
|
||||
if ((source[s] == '"' || source[s] == '\\') && source[s + 1] == '"')
|
||||
s++;
|
||||
dest[d] = source[s];
|
||||
} /* for */
|
||||
dest[d] = '\0';
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
} /* switch */
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
||||
static TCHAR *cleanstring(TCHAR *string, enum quote_option *quotes)
|
||||
{
|
||||
int isstring;
|
||||
TCHAR *ep;
|
||||
|
||||
assert(string != NULL);
|
||||
assert(quotes != NULL);
|
||||
|
||||
/* Remove a trailing comment */
|
||||
isstring = 0;
|
||||
for (ep = string; *ep != '\0' && ((*ep != ';' && *ep != '#') || isstring); ep++) {
|
||||
if (*ep == '"') {
|
||||
if (*(ep + 1) == '"')
|
||||
ep++; /* skip "" (both quotes) */
|
||||
else
|
||||
isstring = !isstring; /* single quote, toggle isstring */
|
||||
} else if (*ep == '\\' && *(ep + 1) == '"') {
|
||||
ep++; /* skip \" (both quotes */
|
||||
} /* if */
|
||||
} /* for */
|
||||
assert(ep != NULL && (*ep == '\0' || *ep == ';' || *ep == '#'));
|
||||
*ep = '\0'; /* terminate at a comment */
|
||||
striptrailing(string);
|
||||
/* Remove double quotes surrounding a value */
|
||||
*quotes = QUOTE_NONE;
|
||||
if (*string == '"' && (ep = _tcschr(string, '\0')) != NULL && *(ep - 1) == '"') {
|
||||
string++;
|
||||
*--ep = '\0';
|
||||
*quotes = QUOTE_DEQUOTE; /* this is a string, so remove escaped characters */
|
||||
} /* if */
|
||||
return string;
|
||||
}
|
||||
|
||||
static int getkeystring(INI_FILETYPE *fp, const TCHAR *Section, const TCHAR *Key,
|
||||
int idxSection, int idxKey, TCHAR *Buffer, int BufferSize)
|
||||
{
|
||||
TCHAR *sp, *ep;
|
||||
int len, idx;
|
||||
enum quote_option quotes;
|
||||
TCHAR LocalBuffer[INI_BUFFERSIZE];
|
||||
|
||||
assert(fp != NULL);
|
||||
/* Move through file 1 line at a time until a section is matched or EOF. If
|
||||
* parameter Section is NULL, only look at keys above the first section. If
|
||||
* idxSection is postive, copy the relevant section name.
|
||||
*/
|
||||
len = (Section != NULL) ? _tcslen(Section) : 0;
|
||||
if (len > 0 || idxSection >= 0) {
|
||||
idx = -1;
|
||||
do {
|
||||
if (!ini_read(LocalBuffer, INI_BUFFERSIZE, fp))
|
||||
return 0;
|
||||
sp = skipleading(LocalBuffer);
|
||||
ep = _tcschr(sp, ']');
|
||||
} while (*sp != '[' || ep == NULL || (((int)(ep-sp-1) != len || _tcsnicmp(sp+1,Section,len) != 0) && ++idx != idxSection));
|
||||
if (idxSection >= 0) {
|
||||
if (idx == idxSection) {
|
||||
assert(ep != NULL);
|
||||
assert(*ep == ']');
|
||||
*ep = '\0';
|
||||
save_strncpy(Buffer, sp + 1, BufferSize, QUOTE_NONE);
|
||||
return 1;
|
||||
} /* if */
|
||||
return 0; /* no more section found */
|
||||
} /* if */
|
||||
} /* if */
|
||||
|
||||
/* Now that the section has been found, find the entry.
|
||||
* Stop searching upon leaving the section's area.
|
||||
*/
|
||||
assert(Key != NULL || idxKey >= 0);
|
||||
len = (Key != NULL) ? (int)_tcslen(Key) : 0;
|
||||
idx = -1;
|
||||
do {
|
||||
if (!ini_read(LocalBuffer,INI_BUFFERSIZE,fp) || *(sp = skipleading(LocalBuffer)) == '[')
|
||||
return 0;
|
||||
sp = skipleading(LocalBuffer);
|
||||
ep = _tcschr(sp, '='); /* Parse out the equal sign */
|
||||
if (ep == NULL)
|
||||
ep = _tcschr(sp, ':');
|
||||
} while (*sp == ';' || *sp == '#' || ep == NULL || (((int)(skiptrailing(ep,sp)-sp) != len || _tcsnicmp(sp,Key,len) != 0) && ++idx != idxKey));
|
||||
if (idxKey >= 0) {
|
||||
if (idx == idxKey) {
|
||||
assert(ep != NULL);
|
||||
assert(*ep == '=' || *ep == ':');
|
||||
*ep = '\0';
|
||||
striptrailing(sp);
|
||||
save_strncpy(Buffer, sp, BufferSize, QUOTE_NONE);
|
||||
return 1;
|
||||
} /* if */
|
||||
return 0; /* no more key found (in this section) */
|
||||
} /* if */
|
||||
|
||||
/* Copy up to BufferSize chars to buffer */
|
||||
assert(ep != NULL);
|
||||
assert(*ep == '=' || *ep == ':');
|
||||
sp = skipleading(ep + 1);
|
||||
sp = cleanstring(sp, "es); /* Remove a trailing comment */
|
||||
save_strncpy(Buffer, sp, BufferSize, quotes);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/** ini_gets()
|
||||
* \param Section the name of the section to search for
|
||||
* \param Key the name of the entry to find the value of
|
||||
* \param DefValue default string in the event of a failed read
|
||||
* \param Buffer a pointer to the buffer to copy into
|
||||
* \param BufferSize the maximum number of characters to copy
|
||||
* \param Filename the name and full path of the .ini file to read from
|
||||
*
|
||||
* \return the number of characters copied into the supplied buffer
|
||||
*/
|
||||
int ini_gets(const TCHAR *Section, const TCHAR *Key, const TCHAR *DefValue,
|
||||
TCHAR *Buffer, int BufferSize, const TCHAR *Filename)
|
||||
{
|
||||
INI_FILETYPE fp;
|
||||
int ok = 0;
|
||||
|
||||
if (Buffer == NULL || BufferSize <= 0 || Key == NULL)
|
||||
return 0;
|
||||
if (ini_openread(Filename, &fp)) {
|
||||
ok = getkeystring(&fp, Section, Key, -1, -1, Buffer, BufferSize);
|
||||
(void)ini_close(&fp);
|
||||
} /* if */
|
||||
if (!ok)
|
||||
save_strncpy(Buffer, DefValue, BufferSize, QUOTE_NONE);
|
||||
return _tcslen(Buffer);
|
||||
}
|
||||
|
||||
/** ini_getl()
|
||||
* \param Section the name of the section to search for
|
||||
* \param Key the name of the entry to find the value of
|
||||
* \param DefValue the default value in the event of a failed read
|
||||
* \param Filename the name of the .ini file to read from
|
||||
*
|
||||
* \return the value located at Key
|
||||
*/
|
||||
long ini_getl(const TCHAR *Section, const TCHAR *Key, long DefValue, const TCHAR *Filename)
|
||||
{
|
||||
TCHAR LocalBuffer[64];
|
||||
int len = ini_gets(Section, Key, __T(""), LocalBuffer, sizearray(LocalBuffer), Filename);
|
||||
return (len == 0) ? DefValue
|
||||
: ((len >= 2 && _totupper(LocalBuffer[1]) == 'X') ? _tcstol(LocalBuffer, NULL, 16)
|
||||
: _tcstol(LocalBuffer, NULL, 10));
|
||||
}
|
||||
|
||||
#if defined INI_REAL
|
||||
/** ini_getf()
|
||||
* \param Section the name of the section to search for
|
||||
* \param Key the name of the entry to find the value of
|
||||
* \param DefValue the default value in the event of a failed read
|
||||
* \param Filename the name of the .ini file to read from
|
||||
*
|
||||
* \return the value located at Key
|
||||
*/
|
||||
INI_REAL ini_getf(const TCHAR *Section, const TCHAR *Key, INI_REAL DefValue, const TCHAR *Filename)
|
||||
{
|
||||
TCHAR LocalBuffer[64];
|
||||
int len = ini_gets(Section, Key, __T(""), LocalBuffer, sizearray(LocalBuffer), Filename);
|
||||
return (len == 0) ? DefValue : ini_atof(LocalBuffer);
|
||||
}
|
||||
#endif
|
||||
|
||||
/** ini_getbool()
|
||||
* \param Section the name of the section to search for
|
||||
* \param Key the name of the entry to find the value of
|
||||
* \param DefValue default value in the event of a failed read; it should
|
||||
* zero (0) or one (1).
|
||||
* \param Buffer a pointer to the buffer to copy into
|
||||
* \param BufferSize the maximum number of characters to copy
|
||||
* \param Filename the name and full path of the .ini file to read from
|
||||
*
|
||||
* A true boolean is found if one of the following is matched:
|
||||
* - A string starting with 'y' or 'Y'
|
||||
* - A string starting with 't' or 'T'
|
||||
* - A string starting with '1'
|
||||
*
|
||||
* A false boolean is found if one of the following is matched:
|
||||
* - A string starting with 'n' or 'N'
|
||||
* - A string starting with 'f' or 'F'
|
||||
* - A string starting with '0'
|
||||
*
|
||||
* \return the true/false flag as interpreted at Key
|
||||
*/
|
||||
int ini_getbool(const TCHAR *Section, const TCHAR *Key, int DefValue, const TCHAR *Filename)
|
||||
{
|
||||
TCHAR LocalBuffer[2];
|
||||
int ret;
|
||||
|
||||
ini_gets(Section, Key, __T(""), LocalBuffer, sizearray(LocalBuffer), Filename);
|
||||
LocalBuffer[0] = (TCHAR)toupper(LocalBuffer[0]);
|
||||
if (LocalBuffer[0] == 'Y' || LocalBuffer[0] == '1' || LocalBuffer[0] == 'T')
|
||||
ret = 1;
|
||||
else if (LocalBuffer[0] == 'N' || LocalBuffer[0] == '0' || LocalBuffer[0] == 'F')
|
||||
ret = 0;
|
||||
else
|
||||
ret = DefValue;
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/** ini_getsection()
|
||||
* \param idx the zero-based sequence number of the section to return
|
||||
* \param Buffer a pointer to the buffer to copy into
|
||||
* \param BufferSize the maximum number of characters to copy
|
||||
* \param Filename the name and full path of the .ini file to read from
|
||||
*
|
||||
* \return the number of characters copied into the supplied buffer
|
||||
*/
|
||||
int ini_getsection(int idx, TCHAR *Buffer, int BufferSize, const TCHAR *Filename)
|
||||
{
|
||||
INI_FILETYPE fp;
|
||||
int ok = 0;
|
||||
|
||||
if (Buffer == NULL || BufferSize <= 0 || idx < 0)
|
||||
return 0;
|
||||
if (ini_openread(Filename, &fp)) {
|
||||
ok = getkeystring(&fp, NULL, NULL, idx, -1, Buffer, BufferSize);
|
||||
(void)ini_close(&fp);
|
||||
} /* if */
|
||||
if (!ok)
|
||||
*Buffer = '\0';
|
||||
return _tcslen(Buffer);
|
||||
}
|
||||
|
||||
/** ini_getkey()
|
||||
* \param Section the name of the section to browse through, or NULL to
|
||||
* browse through the keys outside any section
|
||||
* \param idx the zero-based sequence number of the key to return
|
||||
* \param Buffer a pointer to the buffer to copy into
|
||||
* \param BufferSize the maximum number of characters to copy
|
||||
* \param Filename the name and full path of the .ini file to read from
|
||||
*
|
||||
* \return the number of characters copied into the supplied buffer
|
||||
*/
|
||||
int ini_getkey(const TCHAR *Section, int idx, TCHAR *Buffer, int BufferSize, const TCHAR *Filename)
|
||||
{
|
||||
INI_FILETYPE fp;
|
||||
int ok = 0;
|
||||
|
||||
if (Buffer == NULL || BufferSize <= 0 || idx < 0)
|
||||
return 0;
|
||||
if (ini_openread(Filename, &fp)) {
|
||||
ok = getkeystring(&fp, Section, NULL, -1, idx, Buffer, BufferSize);
|
||||
(void)ini_close(&fp);
|
||||
} /* if */
|
||||
if (!ok)
|
||||
*Buffer = '\0';
|
||||
return _tcslen(Buffer);
|
||||
}
|
||||
|
||||
|
||||
#if !defined INI_NOBROWSE
|
||||
/** ini_browse()
|
||||
* \param Callback a pointer to a function that will be called for every
|
||||
* setting in the INI file.
|
||||
* \param UserData arbitrary data, which the function passes on the the
|
||||
* \c Callback function
|
||||
* \param Filename the name and full path of the .ini file to read from
|
||||
*
|
||||
* \return 1 on success, 0 on failure (INI file not found)
|
||||
*
|
||||
* \note The \c Callback function must return 1 to continue
|
||||
* browsing through the INI file, or 0 to stop. Even when the
|
||||
* callback stops the browsing, this function will return 1
|
||||
* (for success).
|
||||
*/
|
||||
int ini_browse(INI_CALLBACK Callback, const void *UserData, const TCHAR *Filename)
|
||||
{
|
||||
TCHAR LocalBuffer[INI_BUFFERSIZE];
|
||||
TCHAR *sp, *ep;
|
||||
int lenSec, lenKey;
|
||||
enum quote_option quotes;
|
||||
INI_FILETYPE fp;
|
||||
|
||||
if (Callback == NULL)
|
||||
return 0;
|
||||
if (!ini_openread(Filename, &fp))
|
||||
return 0;
|
||||
|
||||
LocalBuffer[0] = '\0'; /* copy an empty section in the buffer */
|
||||
lenSec = _tcslen(LocalBuffer) + 1;
|
||||
for ( ;; ) {
|
||||
if (!ini_read(LocalBuffer + lenSec, INI_BUFFERSIZE - lenSec, &fp))
|
||||
break;
|
||||
sp = skipleading(LocalBuffer + lenSec);
|
||||
/* ignore empty strings and comments */
|
||||
if (*sp == '\0' || *sp == ';' || *sp == '#')
|
||||
continue;
|
||||
/* see whether we reached a new section */
|
||||
ep = _tcschr(sp, ']');
|
||||
if (*sp == '[' && ep != NULL) {
|
||||
*ep = '\0';
|
||||
save_strncpy(LocalBuffer, sp + 1, INI_BUFFERSIZE, QUOTE_NONE);
|
||||
lenSec = _tcslen(LocalBuffer) + 1;
|
||||
continue;
|
||||
} /* if */
|
||||
/* not a new section, test for a key/value pair */
|
||||
ep = _tcschr(sp, '='); /* test for the equal sign or colon */
|
||||
if (ep == NULL)
|
||||
ep = _tcschr(sp, ':');
|
||||
if (ep == NULL)
|
||||
continue; /* invalid line, ignore */
|
||||
*ep++ = '\0'; /* split the key from the value */
|
||||
striptrailing(sp);
|
||||
save_strncpy(LocalBuffer + lenSec, sp, INI_BUFFERSIZE - lenSec, QUOTE_NONE);
|
||||
lenKey = _tcslen(LocalBuffer + lenSec) + 1;
|
||||
/* clean up the value */
|
||||
sp = skipleading(ep);
|
||||
sp = cleanstring(sp, "es); /* Remove a trailing comment */
|
||||
save_strncpy(LocalBuffer + lenSec + lenKey, sp, INI_BUFFERSIZE - lenSec - lenKey, quotes);
|
||||
/* call the callback */
|
||||
if (!Callback(LocalBuffer, LocalBuffer + lenSec, LocalBuffer + lenSec + lenKey, UserData))
|
||||
break;
|
||||
} /* for */
|
||||
|
||||
(void)ini_close(&fp);
|
||||
return 1;
|
||||
}
|
||||
#endif /* INI_NOBROWSE */
|
||||
|
||||
#if ! defined INI_READONLY
|
||||
static void ini_tempname(TCHAR *dest, const TCHAR *source, int maxlength)
|
||||
{
|
||||
TCHAR *p;
|
||||
|
||||
save_strncpy(dest, source, maxlength, QUOTE_NONE);
|
||||
p = _tcsrchr(dest, '\0');
|
||||
assert(p != NULL);
|
||||
*(p - 1) = '~';
|
||||
}
|
||||
|
||||
static enum quote_option check_enquote(const TCHAR *Value)
|
||||
{
|
||||
const TCHAR *p;
|
||||
|
||||
/* run through the value, if it has trailing spaces, or '"', ';' or '#'
|
||||
* characters, enquote it
|
||||
*/
|
||||
assert(Value != NULL);
|
||||
for (p = Value; *p != '\0' && *p != '"' && *p != ';' && *p != '#'; p++)
|
||||
/* nothing */;
|
||||
return (*p != '\0' || (p > Value && *(p - 1) == ' ')) ? QUOTE_ENQUOTE : QUOTE_NONE;
|
||||
}
|
||||
|
||||
static void writesection(TCHAR *LocalBuffer, const TCHAR *Section, INI_FILETYPE *fp)
|
||||
{
|
||||
TCHAR *p;
|
||||
|
||||
if (Section != NULL && _tcslen(Section) > 0) {
|
||||
LocalBuffer[0] = '[';
|
||||
save_strncpy(LocalBuffer + 1, Section, INI_BUFFERSIZE - 4, QUOTE_NONE); /* -1 for '[', -1 for ']', -2 for '\r\n' */
|
||||
p = _tcsrchr(LocalBuffer, '\0');
|
||||
assert(p != NULL);
|
||||
*p++ = ']';
|
||||
_tcscpy(p, INI_LINETERM); /* copy line terminator (typically "\n") */
|
||||
(void)ini_write(LocalBuffer, fp);
|
||||
} /* if */
|
||||
}
|
||||
|
||||
static void writekey(TCHAR *LocalBuffer, const TCHAR *Key, const TCHAR *Value, INI_FILETYPE *fp)
|
||||
{
|
||||
TCHAR *p;
|
||||
enum quote_option option = check_enquote(Value);
|
||||
save_strncpy(LocalBuffer, Key, INI_BUFFERSIZE - 3, QUOTE_NONE); /* -1 for '=', -2 for '\r\n' */
|
||||
p = _tcsrchr(LocalBuffer, '\0');
|
||||
assert(p != NULL);
|
||||
*p++ = '=';
|
||||
save_strncpy(p, Value, INI_BUFFERSIZE - (p - LocalBuffer) - 2, option); /* -2 for '\r\n' */
|
||||
p = _tcsrchr(LocalBuffer, '\0');
|
||||
assert(p != NULL);
|
||||
_tcscpy(p, INI_LINETERM); /* copy line terminator (typically "\n") */
|
||||
(void)ini_write(LocalBuffer, fp);
|
||||
}
|
||||
|
||||
static int cache_accum(const TCHAR *string, int *size, int max)
|
||||
{
|
||||
int len = _tcslen(string);
|
||||
if (*size + len >= max)
|
||||
return 0;
|
||||
*size += len;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int cache_flush(TCHAR *buffer, int *size,
|
||||
INI_FILETYPE *rfp, INI_FILETYPE *wfp, INI_FILEPOS *mark)
|
||||
{
|
||||
int pos = 0;
|
||||
|
||||
(void)ini_seek(rfp, mark);
|
||||
assert(buffer != NULL);
|
||||
buffer[0] = '\0';
|
||||
assert(size != NULL);
|
||||
while (pos < *size) {
|
||||
(void)ini_read(buffer + pos, INI_BUFFERSIZE - pos, rfp);
|
||||
pos += _tcslen(buffer + pos);
|
||||
assert(pos <= *size);
|
||||
} /* while */
|
||||
if (buffer[0] != '\0')
|
||||
(void)ini_write(buffer, wfp);
|
||||
(void)ini_tell(rfp, mark); /* update mark */
|
||||
*size = 0;
|
||||
/* return whether the buffer ended with a line termination */
|
||||
return (_tcscmp(buffer + pos - _tcslen(INI_LINETERM), INI_LINETERM) == 0);
|
||||
}
|
||||
|
||||
static int close_rename(INI_FILETYPE *rfp, INI_FILETYPE *wfp, const TCHAR *filename, TCHAR *buffer)
|
||||
{
|
||||
(void)ini_close(rfp);
|
||||
(void)ini_close(wfp);
|
||||
(void)ini_remove(filename);
|
||||
(void)ini_tempname(buffer, filename, INI_BUFFERSIZE);
|
||||
(void)ini_rename(buffer, filename);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/** ini_puts()
|
||||
* \param Section the name of the section to write the string in
|
||||
* \param Key the name of the entry to write, or NULL to erase all keys in the section
|
||||
* \param Value a pointer to the buffer the string, or NULL to erase the key
|
||||
* \param Filename the name and full path of the .ini file to write to
|
||||
*
|
||||
* \return 1 if successful, otherwise 0
|
||||
*/
|
||||
int ini_puts(const TCHAR *Section, const TCHAR *Key, const TCHAR *Value, const TCHAR *Filename)
|
||||
{
|
||||
INI_FILETYPE rfp;
|
||||
INI_FILETYPE wfp;
|
||||
INI_FILEPOS mark;
|
||||
TCHAR *sp, *ep;
|
||||
TCHAR LocalBuffer[INI_BUFFERSIZE];
|
||||
int len, match, flag, cachelen;
|
||||
|
||||
assert(Filename != NULL);
|
||||
if (!ini_openread(Filename, &rfp)) {
|
||||
/* If the .ini file doesn't exist, make a new file */
|
||||
if (Key != NULL && Value != NULL) {
|
||||
if (!ini_openwrite(Filename, &wfp))
|
||||
return 0;
|
||||
writesection(LocalBuffer, Section, &wfp);
|
||||
writekey(LocalBuffer, Key, Value, &wfp);
|
||||
(void)ini_close(&wfp);
|
||||
} /* if */
|
||||
return 1;
|
||||
} /* if */
|
||||
|
||||
/* If parameters Key and Value are valid (so this is not an "erase" request)
|
||||
* and the setting already exists and it already has the correct value, do
|
||||
* nothing. This early bail-out avoids rewriting the INI file for no reason.
|
||||
*/
|
||||
if (Key != NULL && Value != NULL) {
|
||||
(void)ini_tell(&rfp, &mark);
|
||||
match = getkeystring(&rfp, Section, Key, -1, -1, LocalBuffer, sizearray(LocalBuffer));
|
||||
if (match && _tcscmp(LocalBuffer,Value) == 0) {
|
||||
(void)ini_close(&rfp);
|
||||
return 1;
|
||||
} /* if */
|
||||
/* key not found, or different value -> proceed (but rewind the input file first) */
|
||||
(void)ini_seek(&rfp, &mark);
|
||||
} /* if */
|
||||
|
||||
/* Get a temporary file name to copy to. Use the existing name, but with
|
||||
* the last character set to a '~'.
|
||||
*/
|
||||
ini_tempname(LocalBuffer, Filename, INI_BUFFERSIZE);
|
||||
if (!ini_openwrite(LocalBuffer, &wfp)) {
|
||||
(void)ini_close(&rfp);
|
||||
return 0;
|
||||
} /* if */
|
||||
(void)ini_tell(&rfp, &mark);
|
||||
cachelen = 0;
|
||||
|
||||
/* Move through the file one line at a time until a section is
|
||||
* matched or until EOF. Copy to temp file as it is read.
|
||||
*/
|
||||
len = (Section != NULL) ? _tcslen(Section) : 0;
|
||||
if (len > 0) {
|
||||
do {
|
||||
if (!ini_read(LocalBuffer, INI_BUFFERSIZE, &rfp)) {
|
||||
/* Failed to find section, so add one to the end */
|
||||
flag = cache_flush(LocalBuffer, &cachelen, &rfp, &wfp, &mark);
|
||||
if (Key!=NULL && Value!=NULL) {
|
||||
if (!flag)
|
||||
(void)ini_write(INI_LINETERM, &wfp); /* force a new line behind the last line of the INI file */
|
||||
writesection(LocalBuffer, Section, &wfp);
|
||||
writekey(LocalBuffer, Key, Value, &wfp);
|
||||
} /* if */
|
||||
return close_rename(&rfp, &wfp, Filename, LocalBuffer); /* clean up and rename */
|
||||
} /* if */
|
||||
/* Copy the line from source to dest, but not if this is the section that
|
||||
* we are looking for and this section must be removed
|
||||
*/
|
||||
sp = skipleading(LocalBuffer);
|
||||
ep = _tcschr(sp, ']');
|
||||
match = (*sp == '[' && ep != NULL && (int)(ep-sp-1) == len && _tcsnicmp(sp + 1,Section,len) == 0);
|
||||
if (!match || Key != NULL) {
|
||||
if (!cache_accum(LocalBuffer, &cachelen, INI_BUFFERSIZE)) {
|
||||
cache_flush(LocalBuffer, &cachelen, &rfp, &wfp, &mark);
|
||||
(void)ini_read(LocalBuffer, INI_BUFFERSIZE, &rfp);
|
||||
cache_accum(LocalBuffer, &cachelen, INI_BUFFERSIZE);
|
||||
} /* if */
|
||||
} /* if */
|
||||
} while (!match);
|
||||
} /* if */
|
||||
cache_flush(LocalBuffer, &cachelen, &rfp, &wfp, &mark);
|
||||
/* when deleting a section, the section head that was just found has not been
|
||||
* copied to the output file, but because this line was not "accumulated" in
|
||||
* the cache, the position in the input file was reset to the point just
|
||||
* before the section; this must now be skipped (again)
|
||||
*/
|
||||
if (Key == NULL) {
|
||||
(void)ini_read(LocalBuffer, INI_BUFFERSIZE, &rfp);
|
||||
(void)ini_tell(&rfp, &mark);
|
||||
} /* if */
|
||||
|
||||
/* Now that the section has been found, find the entry. Stop searching
|
||||
* upon leaving the section's area. Copy the file as it is read
|
||||
* and create an entry if one is not found.
|
||||
*/
|
||||
len = (Key!=NULL) ? _tcslen(Key) : 0;
|
||||
for( ;; ) {
|
||||
if (!ini_read(LocalBuffer, INI_BUFFERSIZE, &rfp)) {
|
||||
/* EOF without an entry so make one */
|
||||
flag = cache_flush(LocalBuffer, &cachelen, &rfp, &wfp, &mark);
|
||||
if (Key!=NULL && Value!=NULL) {
|
||||
if (!flag)
|
||||
(void)ini_write(INI_LINETERM, &wfp); /* force a new line behind the last line of the INI file */
|
||||
writekey(LocalBuffer, Key, Value, &wfp);
|
||||
} /* if */
|
||||
return close_rename(&rfp, &wfp, Filename, LocalBuffer); /* clean up and rename */
|
||||
} /* if */
|
||||
sp = skipleading(LocalBuffer);
|
||||
ep = _tcschr(sp, '='); /* Parse out the equal sign */
|
||||
if (ep == NULL)
|
||||
ep = _tcschr(sp, ':');
|
||||
match = (ep != NULL && (int)(skiptrailing(ep,sp)-sp) == len && _tcsnicmp(sp,Key,len) == 0);
|
||||
if ((Key != NULL && match) || *sp == '[')
|
||||
break; /* found the key, or found a new section */
|
||||
/* copy other keys in the section */
|
||||
if (Key == NULL) {
|
||||
(void)ini_tell(&rfp, &mark); /* we are deleting the entire section, so update the read position */
|
||||
} else {
|
||||
if (!cache_accum(LocalBuffer, &cachelen, INI_BUFFERSIZE)) {
|
||||
cache_flush(LocalBuffer, &cachelen, &rfp, &wfp, &mark);
|
||||
(void)ini_read(LocalBuffer, INI_BUFFERSIZE, &rfp);
|
||||
cache_accum(LocalBuffer, &cachelen, INI_BUFFERSIZE);
|
||||
} /* if */
|
||||
} /* if */
|
||||
} /* for */
|
||||
/* the key was found, or we just dropped on the next section (meaning that it
|
||||
* wasn't found); in both cases we need to write the key, but in the latter
|
||||
* case, we also need to write the line starting the new section after writing
|
||||
* the key
|
||||
*/
|
||||
flag = (*sp == '[');
|
||||
cache_flush(LocalBuffer, &cachelen, &rfp, &wfp, &mark);
|
||||
if (Key != NULL && Value != NULL)
|
||||
writekey(LocalBuffer, Key, Value, &wfp);
|
||||
/* cache_flush() reset the "read pointer" to the start of the line with the
|
||||
* previous key or the new section; read it again (because writekey() destroyed
|
||||
* the buffer)
|
||||
*/
|
||||
(void)ini_read(LocalBuffer, INI_BUFFERSIZE, &rfp);
|
||||
if (flag) {
|
||||
/* the new section heading needs to be copied to the output file */
|
||||
cache_accum(LocalBuffer, &cachelen, INI_BUFFERSIZE);
|
||||
} else {
|
||||
/* forget the old key line */
|
||||
(void)ini_tell(&rfp, &mark);
|
||||
} /* if */
|
||||
/* Copy the rest of the INI file */
|
||||
while (ini_read(LocalBuffer, INI_BUFFERSIZE, &rfp)) {
|
||||
if (!cache_accum(LocalBuffer, &cachelen, INI_BUFFERSIZE)) {
|
||||
cache_flush(LocalBuffer, &cachelen, &rfp, &wfp, &mark);
|
||||
(void)ini_read(LocalBuffer, INI_BUFFERSIZE, &rfp);
|
||||
cache_accum(LocalBuffer, &cachelen, INI_BUFFERSIZE);
|
||||
} /* if */
|
||||
} /* while */
|
||||
cache_flush(LocalBuffer, &cachelen, &rfp, &wfp, &mark);
|
||||
return close_rename(&rfp, &wfp, Filename, LocalBuffer); /* clean up and rename */
|
||||
}
|
||||
|
||||
/* Ansi C "itoa" based on Kernighan & Ritchie's "Ansi C" book. */
|
||||
#define ABS(v) ((v) < 0 ? -(v) : (v))
|
||||
|
||||
static void strreverse(TCHAR *str)
|
||||
{
|
||||
TCHAR t;
|
||||
int i, j;
|
||||
|
||||
for (i = 0, j = _tcslen(str) - 1; i < j; i++, j--) {
|
||||
t = str[i];
|
||||
str[i] = str[j];
|
||||
str[j] = t;
|
||||
} /* for */
|
||||
}
|
||||
|
||||
static void long2str(long value, TCHAR *str)
|
||||
{
|
||||
int i = 0;
|
||||
long sign = value;
|
||||
int n;
|
||||
|
||||
/* generate digits in reverse order */
|
||||
do {
|
||||
n = (int)(value % 10); /* get next lowest digit */
|
||||
str[i++] = (TCHAR)(ABS(n) + '0'); /* handle case of negative digit */
|
||||
} while (value /= 10); /* delete the lowest digit */
|
||||
if (sign < 0)
|
||||
str[i++] = '-';
|
||||
str[i] = '\0';
|
||||
|
||||
strreverse(str);
|
||||
}
|
||||
|
||||
/** ini_putl()
|
||||
* \param Section the name of the section to write the value in
|
||||
* \param Key the name of the entry to write
|
||||
* \param Value the value to write
|
||||
* \param Filename the name and full path of the .ini file to write to
|
||||
*
|
||||
* \return 1 if successful, otherwise 0
|
||||
*/
|
||||
int ini_putl(const TCHAR *Section, const TCHAR *Key, long Value, const TCHAR *Filename)
|
||||
{
|
||||
TCHAR LocalBuffer[32];
|
||||
long2str(Value, LocalBuffer);
|
||||
return ini_puts(Section, Key, LocalBuffer, Filename);
|
||||
}
|
||||
|
||||
#if defined INI_REAL
|
||||
/** ini_putf()
|
||||
* \param Section the name of the section to write the value in
|
||||
* \param Key the name of the entry to write
|
||||
* \param Value the value to write
|
||||
* \param Filename the name and full path of the .ini file to write to
|
||||
*
|
||||
* \return 1 if successful, otherwise 0
|
||||
*/
|
||||
int ini_putf(const TCHAR *Section, const TCHAR *Key, INI_REAL Value, const TCHAR *Filename)
|
||||
{
|
||||
TCHAR LocalBuffer[64];
|
||||
ini_ftoa(LocalBuffer, Value);
|
||||
return ini_puts(Section, Key, LocalBuffer, Filename);
|
||||
}
|
||||
#endif /* INI_REAL */
|
||||
#endif /* !INI_READONLY */
|
@ -0,0 +1,152 @@
|
||||
/* minIni - Multi-Platform INI file parser, suitable for embedded systems
|
||||
*
|
||||
* Copyright (c) CompuPhase, 2008-2012
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Version: $Id: minIni.h 44 2012-01-04 15:52:56Z thiadmer.riemersma@gmail.com $
|
||||
*/
|
||||
#ifndef MININI_H
|
||||
#define MININI_H
|
||||
|
||||
#include "minGlue.h"
|
||||
|
||||
#if (defined _UNICODE || defined __UNICODE__ || defined UNICODE) && !defined MININI_ANSI
|
||||
#include <tchar.h>
|
||||
#define mTCHAR TCHAR
|
||||
#else
|
||||
/* force TCHAR to be "char", but only for minIni */
|
||||
#define mTCHAR char
|
||||
#endif
|
||||
|
||||
#if !defined INI_BUFFERSIZE
|
||||
#define INI_BUFFERSIZE 512
|
||||
#endif
|
||||
|
||||
#if defined __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int ini_getbool(const mTCHAR *Section, const mTCHAR *Key, int DefValue, const mTCHAR *Filename);
|
||||
long ini_getl(const mTCHAR *Section, const mTCHAR *Key, long DefValue, const mTCHAR *Filename);
|
||||
int ini_gets(const mTCHAR *Section, const mTCHAR *Key, const mTCHAR *DefValue, mTCHAR *Buffer, int BufferSize, const mTCHAR *Filename);
|
||||
int ini_getsection(int idx, mTCHAR *Buffer, int BufferSize, const mTCHAR *Filename);
|
||||
int ini_getkey(const mTCHAR *Section, int idx, mTCHAR *Buffer, int BufferSize, const mTCHAR *Filename);
|
||||
|
||||
#if defined INI_REAL
|
||||
INI_REAL ini_getf(const mTCHAR *Section, const mTCHAR *Key, INI_REAL DefValue, const mTCHAR *Filename);
|
||||
#endif
|
||||
|
||||
#if !defined INI_READONLY
|
||||
int ini_putl(const mTCHAR *Section, const mTCHAR *Key, long Value, const mTCHAR *Filename);
|
||||
int ini_puts(const mTCHAR *Section, const mTCHAR *Key, const mTCHAR *Value, const mTCHAR *Filename);
|
||||
#if defined INI_REAL
|
||||
int ini_putf(const mTCHAR *Section, const mTCHAR *Key, INI_REAL Value, const mTCHAR *Filename);
|
||||
#endif
|
||||
#endif /* INI_READONLY */
|
||||
|
||||
#if !defined INI_NOBROWSE
|
||||
typedef int (*INI_CALLBACK)(const mTCHAR *Section, const mTCHAR *Key, const mTCHAR *Value, const void *UserData);
|
||||
int ini_browse(INI_CALLBACK Callback, const void *UserData, const mTCHAR *Filename);
|
||||
#endif /* INI_NOBROWSE */
|
||||
|
||||
#if defined __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if defined __cplusplus
|
||||
|
||||
#if defined __WXWINDOWS__
|
||||
#include "wxMinIni.h"
|
||||
#else
|
||||
#include <string>
|
||||
|
||||
/* The C++ class in minIni.h was contributed by Steven Van Ingelgem. */
|
||||
class minIni
|
||||
{
|
||||
public:
|
||||
minIni(const std::string& filename) : iniFilename(filename)
|
||||
{ }
|
||||
|
||||
bool getbool(const std::string& Section, const std::string& Key, bool DefValue=false) const
|
||||
{ return ini_getbool(Section.c_str(), Key.c_str(), int(DefValue), iniFilename.c_str()) != 0; }
|
||||
|
||||
long getl(const std::string& Section, const std::string& Key, long DefValue=0) const
|
||||
{ return ini_getl(Section.c_str(), Key.c_str(), DefValue, iniFilename.c_str()); }
|
||||
|
||||
int geti(const std::string& Section, const std::string& Key, int DefValue=0) const
|
||||
{ return static_cast<int>(this->getl(Section, Key, long(DefValue))); }
|
||||
|
||||
std::string gets(const std::string& Section, const std::string& Key, const std::string& DefValue="") const
|
||||
{
|
||||
char buffer[INI_BUFFERSIZE];
|
||||
ini_gets(Section.c_str(), Key.c_str(), DefValue.c_str(), buffer, INI_BUFFERSIZE, iniFilename.c_str());
|
||||
return buffer;
|
||||
}
|
||||
|
||||
std::string getsection(int idx) const
|
||||
{
|
||||
char buffer[INI_BUFFERSIZE];
|
||||
ini_getsection(idx, buffer, INI_BUFFERSIZE, iniFilename.c_str());
|
||||
return buffer;
|
||||
}
|
||||
|
||||
std::string getkey(const std::string& Section, int idx) const
|
||||
{
|
||||
char buffer[INI_BUFFERSIZE];
|
||||
ini_getkey(Section.c_str(), idx, buffer, INI_BUFFERSIZE, iniFilename.c_str());
|
||||
return buffer;
|
||||
}
|
||||
|
||||
#if defined INI_REAL
|
||||
INI_REAL getf(const std::string& Section, const std::string& Key, INI_REAL DefValue=0) const
|
||||
{ return ini_getf(Section.c_str(), Key.c_str(), DefValue, iniFilename.c_str()); }
|
||||
#endif
|
||||
|
||||
#if ! defined INI_READONLY
|
||||
bool put(const std::string& Section, const std::string& Key, long Value) const
|
||||
{ return ini_putl(Section.c_str(), Key.c_str(), Value, iniFilename.c_str()) != 0; }
|
||||
|
||||
bool put(const std::string& Section, const std::string& Key, int Value) const
|
||||
{ return ini_putl(Section.c_str(), Key.c_str(), (long)Value, iniFilename.c_str()) != 0; }
|
||||
|
||||
bool put(const std::string& Section, const std::string& Key, bool Value) const
|
||||
{ return ini_putl(Section.c_str(), Key.c_str(), (long)Value, iniFilename.c_str()) != 0; }
|
||||
|
||||
bool put(const std::string& Section, const std::string& Key, const std::string& Value) const
|
||||
{ return ini_puts(Section.c_str(), Key.c_str(), Value.c_str(), iniFilename.c_str()) != 0; }
|
||||
|
||||
bool put(const std::string& Section, const std::string& Key, const char* Value) const
|
||||
{ return ini_puts(Section.c_str(), Key.c_str(), Value, iniFilename.c_str()) != 0; }
|
||||
|
||||
#if defined INI_REAL
|
||||
bool put(const std::string& Section, const std::string& Key, INI_REAL Value) const
|
||||
{ return ini_putf(Section.c_str(), Key.c_str(), Value, iniFilename.c_str()) != 0; }
|
||||
#endif
|
||||
|
||||
bool del(const std::string& Section, const std::string& Key) const
|
||||
{ return ini_puts(Section.c_str(), Key.c_str(), 0, iniFilename.c_str()) != 0; }
|
||||
|
||||
bool del(const std::string& Section) const
|
||||
{ return ini_puts(Section.c_str(), 0, 0, iniFilename.c_str()) != 0; }
|
||||
#endif
|
||||
|
||||
private:
|
||||
std::string iniFilename;
|
||||
};
|
||||
|
||||
#endif /* __WXWINDOWS__ */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* MININI_H */
|
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
eval $(awk '/IEDName/ { printf("old_ied=%s",$2) }' /scl_srvr/startup.cfg )
|
||||
new_ied=$1
|
||||
sed -i "s/$old_ied/$new_ied/g" /scl_srvr/startup.cfg
|
||||
sed -i "s/$old_ied/$new_ied/g" /scl_srvr/TEMPLATE.icd
|
||||
sed -i "s/$old_ied/$new_ied/g" /scl_srvr/datamap.cfg
|
||||
echo "Change $old_ied to $new_ied successfull"
|
@ -0,0 +1,52 @@
|
||||
#include "msq.h"
|
||||
#include <sys/time.h>
|
||||
|
||||
mqd_t create_mq(const char *mq_name,long int mq_maxmsg,long int mq_msgsize)
|
||||
{
|
||||
mqd_t my_mq=(mqd_t)(-1);
|
||||
struct mq_attr my_attr;
|
||||
|
||||
my_attr.mq_flags=0;
|
||||
my_attr.mq_maxmsg=mq_maxmsg;
|
||||
my_attr.mq_msgsize=mq_msgsize;
|
||||
|
||||
my_mq=mq_open(mq_name,O_CREAT|O_RDONLY/*|O_NONBLOCK*/,S_IRWXU|S_IRWXG|S_IRWXO,&my_attr);
|
||||
|
||||
return my_mq;
|
||||
}
|
||||
|
||||
|
||||
mqd_t open_mq(const char *mq_name)
|
||||
{
|
||||
return mq_open(mq_name,O_WRONLY|O_NONBLOCK,0,NULL);
|
||||
}
|
||||
|
||||
|
||||
//timeouts is in us
|
||||
ssize_t recv_mq_wait(mqd_t mq,void *msg,int size,int timeouts)
|
||||
{
|
||||
struct timespec timeout;
|
||||
struct timeval now;
|
||||
ssize_t length;
|
||||
|
||||
/* if(timeouts<0)
|
||||
{
|
||||
mq_receive(mq,(char *)msg,size,unsigned int *proip);
|
||||
}*/
|
||||
gettimeofday(&now,NULL);
|
||||
now.tv_usec+=timeouts;
|
||||
if(now.tv_usec>=1000000)
|
||||
{
|
||||
now.tv_sec+=(now.tv_usec/1000000);
|
||||
now.tv_usec=now.tv_usec%1000000;
|
||||
}
|
||||
timeout.tv_sec=now.tv_sec;
|
||||
timeout.tv_nsec= now.tv_usec*1000;
|
||||
length=mq_timedreceive(mq,(char*)msg,size,NULL,&timeout);
|
||||
return length;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,15 @@
|
||||
#ifndef _MSQ_H
|
||||
#define _MSQ_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <mqueue.h>
|
||||
#include <time.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
mqd_t create_mq(const char *mq_name,long int mq_maxmsg,long int mq_msgsize);
|
||||
mqd_t open_mq(const char *mq_name);
|
||||
ssize_t recv_mq_wait(mqd_t mq,void *msg,int size,int timeouts);
|
||||
|
||||
#endif
|
@ -0,0 +1,8 @@
|
||||
/*
|
||||
* netMr.c
|
||||
*
|
||||
* Created on: Apr 15, 2015
|
||||
* Author: root
|
||||
*/
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,143 @@
|
||||
#include "para.h"
|
||||
#include "common.h"
|
||||
#include "string.h"
|
||||
#include "stdio.h"
|
||||
#include "minIni.h"
|
||||
#include "ysp_debug.h"
|
||||
|
||||
|
||||
int LoadGasSection(char *sec_name,GAS_CAL_PARA *gas_para)
|
||||
{
|
||||
int i,n;
|
||||
char key_name[32];
|
||||
gas_para->position.start=ini_getl(sec_name,"start",0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"%s_start=%d\n",sec_name,gas_para->position.start);
|
||||
gas_para->position.peak=ini_getl(sec_name,"peak",0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"%s_peak=%d\n",sec_name,gas_para->position.peak);
|
||||
gas_para->position.end=ini_getl(sec_name,"end",0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"%s_end=%d\n",sec_name,gas_para->position.end);
|
||||
gas_para->position.width=ini_getl(sec_name,"width",10,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"%s_width=%d\n",sec_name,gas_para->position.width);
|
||||
|
||||
gas_para->gradient.lYmin=ini_getf(sec_name,"lYmin",0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"%s_lYmin=%f\n",sec_name,gas_para->gradient.lYmin);
|
||||
|
||||
gas_para->gradient.lXmax=ini_getf(sec_name,"lXmax",0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"%s_lXmax=%f\n",sec_name,gas_para->gradient.lXmax);
|
||||
|
||||
gas_para->gradient.rYmin=ini_getf(sec_name,"rYmin",0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"%s_rYmin=%f\n",sec_name,gas_para->gradient.rYmin);
|
||||
|
||||
gas_para->gradient.rXmax=ini_getf(sec_name,"rXmax",0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"%s_rXmax=%f\n",sec_name,gas_para->gradient.rXmax);
|
||||
|
||||
gas_para->gradient.rXmax=ini_getf(sec_name,"rXmax",0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"%s_rXmax=%f\n",sec_name,gas_para->gradient.rXmax);
|
||||
for(i=0;i<12;i++)
|
||||
{
|
||||
for(n=0;n<6;n++)
|
||||
{
|
||||
sprintf(key_name,"k%d_fac%d",i+1,n+1);
|
||||
gas_para->correct_fac.k[i].fac[n]=ini_getf(sec_name,key_name,0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"%s_%s=%f\n",sec_name,key_name,gas_para->correct_fac.k[i].fac[n]);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LoadAllPara(YSP_PARA *para_ptr)
|
||||
{
|
||||
//float f;
|
||||
int i;
|
||||
char key_name[64];
|
||||
|
||||
ini_gets("MACH","version","1.00",para_ptr->mach_run_para.version,16,ysp_cfg_file);
|
||||
ini_gets("MACH","station","dummy station",para_ptr->mach_run_para.station,64,ysp_cfg_file);
|
||||
ini_gets("MACH","device","dummy device",para_ptr->mach_run_para.device,64,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"version=%s\n",para_ptr->mach_run_para.version);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"station=%s\n",para_ptr->mach_run_para.station);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"device=%s\n",para_ptr->mach_run_para.device);
|
||||
para_ptr->mach_run_para.start_hour=ini_getl("MACH","start_hour",10,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"start_hour=%d\n",para_ptr->mach_run_para.start_hour);
|
||||
//printf("start_hour=%d\n",para_ptr->mach_run_para.start_hour);
|
||||
para_ptr->mach_run_para.start_minute=ini_getl("MACH","start_minute",0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"start_minute=%d\n",para_ptr->mach_run_para.start_minute);
|
||||
//printf("start_minute=%d\n",para_ptr->mach_run_para.start_minute);
|
||||
para_ptr->mach_run_para.start_interval=ini_getl("MACH","sample_interval",4,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"sample_interval=%d\n",para_ptr->mach_run_para.start_interval);
|
||||
//printf("sample_interval=%d\n",para_ptr->mach_run_para.start_interval);
|
||||
for(i=0;i<8;i++)
|
||||
{
|
||||
sprintf(key_name,"pres%d_fac_a",i+1);
|
||||
para_ptr->mach_run_para.pres_fac[i].a=ini_getf("MACH",key_name,0.4,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"%s=%f\n",key_name,para_ptr->mach_run_para.pres_fac[i].a);
|
||||
sprintf(key_name,"pres%d_fac_b",i+1);
|
||||
para_ptr->mach_run_para.pres_fac[i].b=ini_getf("MACH",key_name,0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"%s=%f\n",key_name,para_ptr->mach_run_para.pres_fac[i].b);
|
||||
}
|
||||
para_ptr->mach_run_para.volt_output[0]=ini_getf("MACH","volt_out1",0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"volt_out1=%f\n",para_ptr->mach_run_para.volt_output[0]);
|
||||
para_ptr->mach_run_para.volt_output[1]=ini_getf("MACH","volt_out2",0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"volt_out2=%f\n",para_ptr->mach_run_para.volt_output[1]);
|
||||
para_ptr->mach_run_para.temperature[0]=ini_getf("MACH","temp1",60,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"temp1=%f\n",para_ptr->mach_run_para.temperature[0]);
|
||||
para_ptr->mach_run_para.temperature[1]=ini_getf("MACH","temp2",60,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"temp2=%f\n",para_ptr->mach_run_para.temperature[1]);
|
||||
para_ptr->mach_run_para.temperature[2]=ini_getf("MACH","temp3",-40,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"temp3=%f\n",para_ptr->mach_run_para.temperature[2]);
|
||||
para_ptr->mach_run_para.temperature[3]=ini_getf("MACH","temp3",0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"temp3=%f\n",para_ptr->mach_run_para.temperature[3]);
|
||||
for(i=0;i<4;i++)
|
||||
{
|
||||
sprintf(key_name,"pid_en%d",i+1);
|
||||
para_ptr->mach_run_para.pid_en[i]=ini_getf("MACH",key_name,0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"%s=%d\n",key_name,para_ptr->mach_run_para.pid_en[i]);
|
||||
}
|
||||
|
||||
for(i=0;i<4;i++)
|
||||
{
|
||||
sprintf(key_name,"kp%d",i+1);
|
||||
para_ptr->mach_run_para.pid_type_def[i].Kp=ini_getf("MACH",key_name,12,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"%s=%f\n",key_name,para_ptr->mach_run_para.pid_type_def[i].Kp);
|
||||
sprintf(key_name,"ki%d",i+1);
|
||||
para_ptr->mach_run_para.pid_type_def[i].Ki=ini_getf("MACH",key_name,0.15,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"%s=%f\n",key_name,para_ptr->mach_run_para.pid_type_def[i].Ki);
|
||||
sprintf(key_name,"kd%d",i+1);
|
||||
para_ptr->mach_run_para.pid_type_def[i].Kd=ini_getf("MACH",key_name,500,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"%s=%f\n",key_name,para_ptr->mach_run_para.pid_type_def[i].Kd);
|
||||
}
|
||||
para_ptr->mach_run_para.sample_len=ini_getl("MACH","sample_len",4000,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"sample_len=%d\n",para_ptr->mach_run_para.sample_len);
|
||||
para_ptr->mach_run_para.sample_rate=ini_getl("MACH","sample_rate",220,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"sample_rate=%d\n",para_ptr->mach_run_para.sample_rate);
|
||||
para_ptr->mach_run_para.sample_offs=ini_getl("MACH","sample_offs",1800,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"sample_offs=%d\n",para_ptr->mach_run_para.sample_offs);
|
||||
|
||||
para_ptr->mach_run_para.sample_cool_en=ini_getl("MACH","sample_cool_en",0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"sample_cool_en=%d\n",para_ptr->mach_run_para.sample_cool_en);
|
||||
|
||||
para_ptr->mach_run_para.co2_pos=ini_getl("MACH","co2_pos",0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"co2_pos=%d\n",para_ptr->mach_run_para.co2_pos);
|
||||
|
||||
para_ptr->mach_run_para.h2o_en=ini_getl("MACH","h2o_en",0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"h2o_en=%d\n",para_ptr->mach_run_para.h2o_en);
|
||||
|
||||
para_ptr->mach_run_para.auto_gas_en=ini_getl("MACH","auto_gas_en",0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"auto_gas_en=%d\n",para_ptr->mach_run_para.auto_gas_en);
|
||||
|
||||
para_ptr->mach_run_para.run_mode=ini_getl("MACH","run_mode",0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"run_mode=%d\n",para_ptr->mach_run_para.run_mode);
|
||||
|
||||
para_ptr->mach_run_para.upload_time=ini_getl("MACH","upload_time",0,ysp_cfg_file);
|
||||
LOG_DEBUG(PARA_TRACE_DEBUG,"upload_time=%d\n",para_ptr->mach_run_para.upload_time);
|
||||
|
||||
LoadGasSection("H2_CAL",¶_ptr->gas_cal_fac[0]);
|
||||
LoadGasSection("CO_CAL",¶_ptr->gas_cal_fac[1]);
|
||||
LoadGasSection("CH4_CAL",¶_ptr->gas_cal_fac[2]);
|
||||
LoadGasSection("C2H4_CAL",¶_ptr->gas_cal_fac[3]);
|
||||
LoadGasSection("C2H6_CAL",¶_ptr->gas_cal_fac[4]);
|
||||
LoadGasSection("C2H2_CAL",¶_ptr->gas_cal_fac[5]);
|
||||
LoadGasSection("CO2_CAL",¶_ptr->co2_cal_fac);
|
||||
return 0;
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
#ifndef _PARA_H
|
||||
#define _PARA_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#define ysp_cfg_file "/usr_app/ysp_cfg.ini"
|
||||
|
||||
|
||||
int LoadAllPara(YSP_PARA *para_ptr);
|
||||
|
||||
#define INI_DEBUG
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,159 @@
|
||||
#!/bin/sh
|
||||
|
||||
# insmod modules and select an appropriate pointercal file depends on the bootargs
|
||||
#if grep "lcd7ic" /proc/cmdline > /dev/null; then
|
||||
# insmod /lib/modules/3.2.0/kernel/drivers/ft5x0x.ko
|
||||
# ln -sf /etc/pointercal_7.0c /etc/pointercal
|
||||
#elif grep "hdmi" /proc/cmdline > /dev/null; then
|
||||
# insmod /lib/modules/3.2.0/kernel/drivers/tda998x.ko
|
||||
#else
|
||||
# insmod /lib/modules/3.2.0/kernel/drivers/ti_tscadc.ko
|
||||
#fi
|
||||
|
||||
#if grep "lcd4i3" /proc/cmdline > /dev/null; then
|
||||
# ln -sf /etc/pointercal_4.3 /etc/pointercal
|
||||
#elif grep "lcd7ir" /proc/cmdline > /dev/null; then
|
||||
# ln -sf /etc/pointercal_7.0r /etc/pointercal
|
||||
#fi
|
||||
|
||||
# Set the QT env
|
||||
#if [ -e /etc/init.d/qt.sh ];then
|
||||
# . /etc/init.d/qt.sh
|
||||
#fi
|
||||
|
||||
export HOME=/root
|
||||
|
||||
echo 60 > /proc/sys/net/ipv4/tcp_keepalive_time
|
||||
echo 8 > /proc/sys/net/ipv4/tcp_keepalive_intvl
|
||||
echo 4 > /proc/sys/net/ipv4/tcp_keepalive_probes
|
||||
|
||||
if [ -f /COMTRADE/S81srvrd ];then
|
||||
#if [ -f /etc/init.d/S81srvrd ];then
|
||||
# echo -n "now backup S81srvrd"
|
||||
# mv /etc/init.d/S81srvrd /etc/init.d/K81srvrd
|
||||
#fi
|
||||
echo -n "now update S81srvrd"
|
||||
mv /COMTRADE/S81srvrd /etc/init.d/S81srvrd
|
||||
chmod +x /etc/init.d/S81srvrd
|
||||
fi
|
||||
|
||||
if [ -f /COMTRADE/S90app ];then
|
||||
#if [ -f /etc/init.d/S90app ];then
|
||||
# echo -n "now backup S90app"
|
||||
# mv /etc/init.d/S90app /etc/init.d/K90app
|
||||
#fi
|
||||
echo -n "now update S90app"
|
||||
mv /COMTRADE/S90app /etc/init.d/S90app
|
||||
chmod +x /etc/init.d/S90app
|
||||
fi
|
||||
|
||||
if [ -f /COMTRADE/S71ntpdate ];then
|
||||
#if [ -f /etc/init.d/S71ntpdate ];then
|
||||
# echo -n "now backup S71ntpdate"
|
||||
# mv /etc/init.d/S71ntpdate /etc/init.d/K71ntpdate
|
||||
#fi
|
||||
echo -n "now update S71ntpdate"
|
||||
mv /COMTRADE/S71ntpdate /etc/init.d/S71ntpdate
|
||||
chmod +x /etc/init.d/S71ntpdate
|
||||
fi
|
||||
|
||||
if [ -f /COMTRADE/app ];then
|
||||
#if [ -f /usr_app/app ];then
|
||||
# echo "now backup user app"
|
||||
# mv /usr_app/app /usr_app/app_bk
|
||||
#fi
|
||||
echo "now update user app"
|
||||
mv /COMTRADE/app /usr_app/app
|
||||
chmod +x /usr_app/app
|
||||
fi
|
||||
|
||||
if [ -f /COMTRADE/scl_srvr_ld ];then
|
||||
#if [ -f "$srvrd" ];then
|
||||
# echo -n "now backup srvrd"
|
||||
# mv "$srvrd" /usr/sbin/scl_srvr_bk
|
||||
#fi
|
||||
echo -n "now update srvrd"
|
||||
mv /COMTRADE/scl_srvr_ld /usr/sbin/scl_srvr_ld
|
||||
chmod +x /usr/sbin/scl_srvr_ld
|
||||
fi
|
||||
|
||||
if [ -f /COMTRADE/TEMPLATE.icd ];then
|
||||
if [ -f /scl_srvr/TEMPLATE.icd ];then
|
||||
echo -n "now backup icd"
|
||||
mv /scl_srvr/TEMPLATE.icd /scl_srvr/TEMPLATE.bk
|
||||
fi
|
||||
echo -n "now update icd"
|
||||
mv /COMTRADE/TEMPLATE.icd /scl_srvr/TEMPLATE.icd
|
||||
fi
|
||||
|
||||
if [ -f /COMTRADE/datamap.cfg ];then
|
||||
if [ -f /scl_srvr/datamap.cfg ];then
|
||||
echo -n "now backup datamap"
|
||||
mv /scl_srvr/datamap.cfg /scl_srvr/datamap.bk
|
||||
fi
|
||||
echo -n "now update datamap"
|
||||
mv /COMTRADE/datamap.cfg /scl_srvr/datamap.cfg
|
||||
fi
|
||||
|
||||
if [ -f /COMTRADE/startup.cfg ];then
|
||||
if [ -f /scl_srvr/startup.cfg ];then
|
||||
echo -n "now backup startup"
|
||||
mv /scl_srvr/startup.cfg /scl_srvr/startup.bk
|
||||
fi
|
||||
echo -n "now update startup"
|
||||
mv /COMTRADE/startup.cfg /scl_srvr/startup.cfg
|
||||
fi
|
||||
|
||||
if [ -f /COMTRADE/osicfg.xml ];then
|
||||
if [ -f /scl_srvr/osicfg.xml ];then
|
||||
echo -n "now backup osicfg"
|
||||
mv /scl_srvr/osicfg.xml /scl_srvr/osicfg.bk
|
||||
fi
|
||||
echo -n "now update osicfg"
|
||||
mv /COMTRADE/osicfg.xml /scl_srvr/osicfg.xml
|
||||
fi
|
||||
|
||||
if [ -f /COMTRADE/interfaces ];then
|
||||
if [ -f /etc/network/interfaces ];then
|
||||
echo -n "now backup interfaces"
|
||||
mv /etc/network/interfaces /etc/network/bkinterfaces
|
||||
fi
|
||||
echo -n "now update interfaces"
|
||||
mv /COMTRADE/interfaces /etc/network/interfaces
|
||||
chmod +x /etc/network/interfaces
|
||||
fi
|
||||
|
||||
if [ -f /COMTRADE/ntpdate ];then
|
||||
#if [ -f /usr/sbin/ntpdate ];then
|
||||
# echo -n "now backup ntpdate"
|
||||
# mv /usr/sbin/ntpdate /usr/sbin/bkntpdate
|
||||
#fi
|
||||
echo -n "now update ntpdate"
|
||||
mv /COMTRADE/ntpdate /usr/sbin/ntpdate
|
||||
chmod +x /usr/sbin/ntpdate
|
||||
fi
|
||||
|
||||
|
||||
# Start all init scripts in /etc/init.d
|
||||
# executing them in numerical order.
|
||||
#
|
||||
for i in /etc/init.d/S??* ;do
|
||||
|
||||
# Ignore dangling symlinks (if any).
|
||||
[ ! -f "$i" ] && continue
|
||||
|
||||
case "$i" in
|
||||
*.sh)
|
||||
# Source shell script for speed.
|
||||
(
|
||||
trap - INT QUIT TSTP
|
||||
set start
|
||||
. $i
|
||||
)
|
||||
;;
|
||||
*)
|
||||
# No sh extension, so fork subprocess.
|
||||
$i start
|
||||
;;
|
||||
esac
|
||||
done
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,21 @@
|
||||
|
||||
//ĎÂĂćłýCOĆäËüśźĘÇśÔľÄ
|
||||
find_mask=0
|
||||
start=283 peak=332 area=0.000000
|
||||
start=500 peak=500 area=0.000000
|
||||
start=596 peak=629 area=0.000000
|
||||
start=2185 peak=2274 area=0.000000
|
||||
start=2830 peak=2910 area=0.000000
|
||||
start=3439 peak=3524 area=0.000000
|
||||
H2=0.000000 CO=0.000000 CH4=0.000000 C2H4=0.000000 C2H6=0.000000 C2H2=0.000000
|
||||
|
||||
|
||||
|
||||
find_mask=61
|
||||
start=281 peak=332 area=2194.000000
|
||||
start=-1 peak=332 area=0.000000
|
||||
start=595 peak=629 area=655.000000
|
||||
start=2066 peak=2274 area=24486.439453
|
||||
start=2805 peak=2910 area=6110.720215
|
||||
start=3409 peak=3524 area=7706.600098
|
||||
H2=4.442850 CO=0.000000 CH4=3.046405 C2H4=2.962859 C2H6=1.454351 C2H2=1.140577
|
@ -0,0 +1,734 @@
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "serial.h"
|
||||
#include "common.h"
|
||||
#include "sample_process.h"
|
||||
#include "analysis.h"
|
||||
#include "ysp_debug.h"
|
||||
|
||||
#define COMTADE_DIR "/COMTRADE"
|
||||
|
||||
#define VIN 4.096 //电桥输入电压
|
||||
#define GND_OFFS 0.254 //差分运放输出基准偏置
|
||||
#define AMP 5.94 //差分运放放大倍数
|
||||
#define IN_OFFS //差分运放负引脚偏置电压
|
||||
#define MCU_VREF 3.3
|
||||
/*
|
||||
typedef struct{
|
||||
unsigned int data_flg1;
|
||||
unsigned int data_flg2;
|
||||
float cold_temp;
|
||||
unsigned char working_state[2];
|
||||
unsigned char relay_state[4];
|
||||
unsigned char sensor_state[4];
|
||||
unsigned char health_state;
|
||||
}SAMPLE_INPUT_TYPE;
|
||||
*/
|
||||
|
||||
/*
|
||||
typedef struct{
|
||||
unsigned char relay_ctrl[4];
|
||||
unsigned char sensor_ctrl[4];
|
||||
unsigned int sample_interval;
|
||||
unsigned int sample_length;
|
||||
float temperature;
|
||||
//PID_SET pid_para;
|
||||
unsigned int rsv[3];
|
||||
}SAMPLE_OUTPUT_TYPE;
|
||||
*/
|
||||
static const char *dir_store_data=COMTADE_DIR;
|
||||
static unsigned char sample_rx_buf[SEGMENT_LENGTH+7];
|
||||
static unsigned char sample_tx_buf[128];
|
||||
static unsigned short data_buf[10000];
|
||||
extern int sample_fd;
|
||||
|
||||
//SAMPLE_OUTPUT_TYPE sample_output_data;
|
||||
//SAMPLE_INPUT_TYPE sample_input_data;
|
||||
|
||||
|
||||
|
||||
unsigned int sample_encode(unsigned char *buf,unsigned char cmd,void *args,unsigned int args_len)
|
||||
{
|
||||
unsigned int length=7;
|
||||
buf[0]=0xAA;
|
||||
buf[1]=0x1;//address
|
||||
buf[2]=(unsigned char)args_len;
|
||||
buf[3]=(unsigned char)(args_len>>8);
|
||||
buf[4]=cmd;
|
||||
if(args!=NULL&&args_len!=0)
|
||||
{
|
||||
memcpy(&buf[5],(unsigned char *)args,args_len);
|
||||
length=args_len+7;
|
||||
}
|
||||
buf[length-2]=cal_sum(buf,length-2);
|
||||
buf[length-1]=0x55;
|
||||
return length;
|
||||
}
|
||||
|
||||
int sample_check(unsigned char *buf,unsigned char cmd,unsigned int buf_len)
|
||||
{
|
||||
unsigned int length;
|
||||
if(buf[0]!=0xAA)
|
||||
return -1;
|
||||
if(buf[buf_len-1]!=0x55)
|
||||
return -2;
|
||||
if(buf[4]!=cmd)
|
||||
return -3;
|
||||
length=(unsigned int)256*buf[3]+buf[2];
|
||||
if((length+7)!=buf_len)
|
||||
return -4;
|
||||
if(chk_sum(buf,buf_len-2,buf[buf_len-2])!=0)
|
||||
return -5;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//查询是否有采样数据
|
||||
unsigned int query_sample_data(unsigned char *ret_data,int len)
|
||||
{
|
||||
int length;
|
||||
int chk_rlt;
|
||||
length=sample_encode(sample_tx_buf,CMD_NORMAL_READ,NULL,0);
|
||||
if(SerialWrite(sample_fd,sample_tx_buf,length)<length)
|
||||
return 1;
|
||||
memset(sample_rx_buf,0,64);
|
||||
if((length=SerialReadEx(sample_fd,sample_rx_buf,len+7,20))>=(len+7))
|
||||
{
|
||||
if((chk_rlt=sample_check(sample_rx_buf,CMD_NORMAL_READ,length))==0)
|
||||
{
|
||||
memcpy(&my_sample_data,&sample_rx_buf[5],sizeof(my_sample_data));
|
||||
//if(ret_data!=NULL&&len!=0)
|
||||
if(ret_data!=NULL)
|
||||
memcpy(ret_data,&my_sample_data.data_flg,sizeof(unsigned int));
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"query_sample_data chk_rlt=%d\n",chk_rlt);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"query_sample_data read resp failed length=%d\n",length);
|
||||
return 2;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
|
||||
/*
|
||||
unsigned int query_sample_data_ex(unsigned char *ret_data,int len)
|
||||
{
|
||||
int length;
|
||||
length=sample_encode(sample_tx_buf,CMD_NORMAL_READ,NULL,0);
|
||||
if(SerialWrite(sample_fd,sample_tx_buf,length)<length)
|
||||
return 1;
|
||||
memset(sample_rx_buf,0,64);
|
||||
if((length=SerialReadEx(sample_fd,sample_rx_buf,sizeof(SAMPLE_INPUT_TYPE)+7,10))>=(sizeof(SAMPLE_INPUT_TYPE)+7))
|
||||
{
|
||||
if(sample_check(sample_rx_buf,CMD_NORMAL_READ,length)==0)
|
||||
{
|
||||
if(ret_data!=NULL&&len!=0)
|
||||
memcpy(ret_data,&sample_rx_buf[5],len);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return 3;
|
||||
}*/
|
||||
|
||||
|
||||
//清除采样数据
|
||||
unsigned int clear_sample_data(void)
|
||||
{
|
||||
int length;
|
||||
length=sample_encode(sample_tx_buf,CMD_CLR_DATA,NULL,0);
|
||||
if(SerialWrite(sample_fd,sample_tx_buf,length)<length)
|
||||
return 1;
|
||||
memset(sample_rx_buf,0,16);
|
||||
if((length=SerialReadEx(sample_fd,sample_rx_buf,8,8))>=8)
|
||||
{
|
||||
if(sample_check(sample_rx_buf,CMD_CLR_DATA,length)==0)
|
||||
{
|
||||
if(sample_rx_buf[5]==SUCCESSFULL)
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"clear_sample_data check sum error\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"clear_sample_data read resp failed length=%d\n",length);
|
||||
return 2;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
|
||||
|
||||
//清除采样数据
|
||||
unsigned int clear_co2_data(void)
|
||||
{
|
||||
int length;
|
||||
length=sample_encode(sample_tx_buf,CMD_CLR_CO2,NULL,0);
|
||||
if(SerialWrite(sample_fd,sample_tx_buf,length)<length)
|
||||
return 1;
|
||||
memset(sample_rx_buf,0,16);
|
||||
if((length=SerialReadEx(sample_fd,sample_rx_buf,8,8))>=8)
|
||||
{
|
||||
if(sample_check(sample_rx_buf,CMD_CLR_CO2,length)==0)
|
||||
{
|
||||
if(sample_rx_buf[5]==SUCCESSFULL)
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"clear_co2_data check sum error\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"clear_co2_data read resp failed length=%d\n",length);
|
||||
return 2;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
|
||||
//启动采样
|
||||
int start_sample_data(unsigned int ch,SAMPLE_PARA_TYPE *sample_para)
|
||||
{
|
||||
int length;
|
||||
unsigned char arg_buf[12];
|
||||
arg_buf[0]=(unsigned char)ch;
|
||||
arg_buf[1]=(unsigned char)(ch>>8);
|
||||
arg_buf[2]=(unsigned char)(sample_para->len);
|
||||
arg_buf[3]=(unsigned char)((sample_para->len)>>8);
|
||||
arg_buf[4]=(unsigned char)(sample_para->intval);
|
||||
arg_buf[5]=(unsigned char)((sample_para->intval)>>8);
|
||||
arg_buf[6]=(unsigned char)(sample_para->offs);
|
||||
arg_buf[7]=(unsigned char)((sample_para->offs)>>8);
|
||||
arg_buf[8]=(unsigned char)(sample_para->co2_pos);
|
||||
arg_buf[9]=(unsigned char)((sample_para->co2_pos)>>8);
|
||||
arg_buf[10]=(unsigned char)(sample_para->co2_len);
|
||||
arg_buf[11]=(unsigned char)((sample_para->co2_len)>>8);
|
||||
length=sample_encode(sample_tx_buf,CMD_START_SAMPLE,arg_buf,sizeof(arg_buf));
|
||||
if(SerialWrite(sample_fd,sample_tx_buf,length)<length)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"start_sample_data send request failed\n");
|
||||
return 1;
|
||||
}
|
||||
memset(sample_rx_buf,0,16);
|
||||
if((length=SerialReadEx(sample_fd,sample_rx_buf,8,8))>=8)
|
||||
{
|
||||
if(sample_check(sample_rx_buf,CMD_START_SAMPLE,length)==0)
|
||||
{
|
||||
if(sample_rx_buf[5]==SUCCESSFULL)
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"start_sample_data check sum error\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"start_sample_data read resp failed length=%d\n",length);
|
||||
return 2;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
|
||||
/*
|
||||
//启动传感器加热
|
||||
int start_sample_heat(unsigned char ch,unsigned char flg)
|
||||
{
|
||||
int length;
|
||||
unsigned char buf[2];
|
||||
buf[0]=ch;
|
||||
buf[1]=flg;
|
||||
length=sample_encode(sample_tx_buf,CMD_SET_RLY,buf,sizeof(buf));
|
||||
if(SerialWrite(sample_fd,sample_tx_buf,length)<length)
|
||||
return 1;
|
||||
memset(sample_rx_buf,0,16);
|
||||
if((length=SerialReadEx(sample_fd,sample_rx_buf,8,8))>=8)
|
||||
{
|
||||
if(sample_check(sample_rx_buf,CMD_SET_RLY,length)==0)
|
||||
{
|
||||
if(sample_rx_buf[5]==SUCCESSFULL)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return 3;
|
||||
}*/
|
||||
|
||||
//读数据
|
||||
//start_pos=起始位置(字节),len=读取长度(字节)
|
||||
int read_co2_segment(int start_pos,int len)
|
||||
{
|
||||
int length;
|
||||
unsigned char arg_buf[4];
|
||||
unsigned char *ptr;
|
||||
ptr=(unsigned char *)&data_buf[0];
|
||||
arg_buf[0]=(unsigned char)start_pos;
|
||||
arg_buf[1]=(unsigned char)(start_pos>>8);
|
||||
arg_buf[2]=(unsigned char)len;
|
||||
arg_buf[3]=(unsigned char)(len>>8);
|
||||
length=sample_encode(sample_tx_buf,CMD_READ_CO2,arg_buf,sizeof(arg_buf));
|
||||
if(SerialWrite(sample_fd,sample_tx_buf,length)<length)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"read_co2_segment sent request failed start_pos=%d len=%d \n",start_pos,len);
|
||||
return 1;
|
||||
}
|
||||
memset(sample_rx_buf,0,sizeof(sample_rx_buf));
|
||||
if((length=SerialReadEx(sample_fd,sample_rx_buf,len+7,16))>=(len+7))
|
||||
{
|
||||
if(sample_check(sample_rx_buf,CMD_READ_CO2,length)==0)
|
||||
{
|
||||
ptr+=start_pos;
|
||||
memcpy((void *)ptr,(const void *)&sample_rx_buf[5],len);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"read_co2_segment check sum failed\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"read_co2_segment read resp failed:received %d bytes\n",length);
|
||||
return 2;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
|
||||
//total_len字节长度
|
||||
unsigned int read_co2_data(unsigned int total_len)
|
||||
{
|
||||
unsigned int i;
|
||||
for(i=0;i<(total_len/SEGMENT_LENGTH);i++)
|
||||
{
|
||||
if(read_co2_segment(i*SEGMENT_LENGTH,SEGMENT_LENGTH)!=0)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"read co2 segment %d total_len=%d failed\n",i,total_len);
|
||||
if(read_co2_segment(i*SEGMENT_LENGTH,SEGMENT_LENGTH)!=0)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"read co2 segment %d failed\n",i);
|
||||
if(read_co2_segment(i*SEGMENT_LENGTH,SEGMENT_LENGTH)!=0)
|
||||
{
|
||||
if(read_co2_segment(i*SEGMENT_LENGTH,SEGMENT_LENGTH)!=0)
|
||||
{
|
||||
if(read_co2_segment(i*SEGMENT_LENGTH,SEGMENT_LENGTH)!=0)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"read co2 segment %d failed\n",i);
|
||||
return i+1;
|
||||
}
|
||||
//LOG_DEBUG(ERROR_DEBUG,"read segment %d failed\n",i);
|
||||
//return i+1;
|
||||
}
|
||||
//LOG_DEBUG(ERROR_DEBUG,"read segment %d failed\n",i);
|
||||
//return i+1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if((total_len%SEGMENT_LENGTH)!=0)
|
||||
{
|
||||
//printf("read segment %d\n",i);
|
||||
if(read_co2_segment(i*SEGMENT_LENGTH,total_len%SEGMENT_LENGTH)!=0)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"read co2 segment %d failed\n",i);
|
||||
if(read_co2_segment(i*SEGMENT_LENGTH,total_len%SEGMENT_LENGTH)!=0)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"read co2 segment %d failed\n",i);
|
||||
if(read_co2_segment(i*SEGMENT_LENGTH,total_len%SEGMENT_LENGTH)!=0)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"read co2 segment %d failed\n",i);
|
||||
return i+1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//读数据
|
||||
//start_pos=起始位置(字节),len=读取长度(字节)
|
||||
int read_segment_data(int start_pos,int len)
|
||||
{
|
||||
int length;
|
||||
unsigned char arg_buf[4];
|
||||
unsigned char *ptr;
|
||||
ptr=(unsigned char *)&data_buf[0];
|
||||
arg_buf[0]=(unsigned char)start_pos;
|
||||
arg_buf[1]=(unsigned char)(start_pos>>8);
|
||||
arg_buf[2]=(unsigned char)len;
|
||||
arg_buf[3]=(unsigned char)(len>>8);
|
||||
length=sample_encode(sample_tx_buf,CMD_READ_SAMPLE,arg_buf,sizeof(arg_buf));
|
||||
if(SerialWrite(sample_fd,sample_tx_buf,length)<length)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"read_segment_data sent request failed start_pos=%d len=%d \n",start_pos,len);
|
||||
return 1;
|
||||
}
|
||||
memset(sample_rx_buf,0,sizeof(sample_rx_buf));
|
||||
if((length=SerialReadEx(sample_fd,sample_rx_buf,len+7,16))>=(len+7))
|
||||
{
|
||||
if(sample_check(sample_rx_buf,CMD_READ_SAMPLE,length)==0)
|
||||
{
|
||||
ptr+=start_pos;
|
||||
memcpy((void *)ptr,(const void *)&sample_rx_buf[5],len);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"read_segment_data check sum failed\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"read_segment_data read resp failed:received %d bytes\n",length);
|
||||
return 2;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
|
||||
//total_len字节长度
|
||||
unsigned int read_sample_data(unsigned int total_len)
|
||||
{
|
||||
unsigned int i;
|
||||
for(i=0;i<(total_len/SEGMENT_LENGTH);i++)
|
||||
{
|
||||
if(read_segment_data(i*SEGMENT_LENGTH,SEGMENT_LENGTH)!=0)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"read segment %d total_len=%d failed\n",i,total_len);
|
||||
if(read_segment_data(i*SEGMENT_LENGTH,SEGMENT_LENGTH)!=0)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"read segment %d failed\n",i);
|
||||
if(read_segment_data(i*SEGMENT_LENGTH,SEGMENT_LENGTH)!=0)
|
||||
{
|
||||
if(read_segment_data(i*SEGMENT_LENGTH,SEGMENT_LENGTH)!=0)
|
||||
{
|
||||
if(read_segment_data(i*SEGMENT_LENGTH,SEGMENT_LENGTH)!=0)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"read segment %d failed\n",i);
|
||||
return i+1;
|
||||
}
|
||||
//LOG_DEBUG(ERROR_DEBUG,"read segment %d failed\n",i);
|
||||
//return i+1;
|
||||
}
|
||||
//LOG_DEBUG(ERROR_DEBUG,"read segment %d failed\n",i);
|
||||
//return i+1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if((total_len%SEGMENT_LENGTH)!=0)
|
||||
{
|
||||
//printf("read segment %d\n",i);
|
||||
if(read_segment_data(i*SEGMENT_LENGTH,total_len%SEGMENT_LENGTH)!=0)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"read segment %d failed\n",i);
|
||||
if(read_segment_data(i*SEGMENT_LENGTH,total_len%SEGMENT_LENGTH)!=0)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"read segment %d failed\n",i);
|
||||
if(read_segment_data(i*SEGMENT_LENGTH,total_len%SEGMENT_LENGTH)!=0)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"read segment %d failed\n",i);
|
||||
return i+1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
char *make_data_file_name(time_t now,unsigned int i)
|
||||
{
|
||||
static char file_name[128];
|
||||
char date_str[32];
|
||||
memset(file_name,0,sizeof(file_name));
|
||||
if(i==0)
|
||||
strftime(date_str,sizeof(date_str),"%Y%m%d_%H%M%S.bin",localtime(&now));
|
||||
else if(i==1)
|
||||
strftime(date_str,sizeof(date_str),"%Y%m%d_%H%M%S.csv",localtime(&now));
|
||||
else if(i==2)
|
||||
strftime(date_str,sizeof(date_str),"%Y%m%d_%H%M%S.co2",localtime(&now));
|
||||
else
|
||||
strftime(date_str,sizeof(date_str),"%Y%m%d_%H%M%S.csv",localtime(&now));
|
||||
sprintf(file_name,"%s/%s",dir_store_data,date_str);
|
||||
return file_name;
|
||||
}
|
||||
|
||||
|
||||
int savefile(const char *file,long offs,void *ptr,unsigned int size)
|
||||
{
|
||||
FILE *fp;
|
||||
fp=fopen(file,"w");
|
||||
if(fp==NULL)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"Creat file %s failed when savefile\r\n",file);
|
||||
return -1;
|
||||
}
|
||||
if(offs!=0)
|
||||
{
|
||||
fseek(fp,offs,SEEK_SET);
|
||||
}
|
||||
if(fwrite((const void *)ptr,size,1,fp)!=1)
|
||||
{
|
||||
fclose(fp);
|
||||
LOG_DEBUG(ERROR_DEBUG,"Write file %s failed when savefile\r\n",file);
|
||||
return -2;
|
||||
}
|
||||
fclose(fp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//采样数据直接存成32位二进制,size为字节长度
|
||||
int save_hex_file(const char *file,long offs,void *ptr,unsigned int size)
|
||||
{
|
||||
FILE *fp;
|
||||
int i;
|
||||
static int hex_buf[5000];
|
||||
fp=fopen(file,"w");
|
||||
if(fp==NULL)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"Creat file %s failed when savefile\r\n",file);
|
||||
return -1;
|
||||
}
|
||||
if(offs!=0)
|
||||
{
|
||||
fseek(fp,offs,SEEK_SET);
|
||||
}
|
||||
for(i=0;i<(size>>1);i++)
|
||||
{
|
||||
memcpy(&hex_buf[i],ptr,sizeof(short));
|
||||
ptr+=2;
|
||||
}
|
||||
if(fwrite((const void *)hex_buf,size*2,1,fp)!=1)
|
||||
{
|
||||
fclose(fp);
|
||||
LOG_DEBUG(ERROR_DEBUG,"Write file %s failed when savefile\r\n",file);
|
||||
return -2;
|
||||
}
|
||||
fclose(fp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
//采样数据存成二进制浮点数
|
||||
int save_float_file(const char *file,long offs,void *ptr,unsigned int size)
|
||||
{
|
||||
static float file_buf[5000];
|
||||
FILE *fp;
|
||||
int i;
|
||||
unsigned char *data_ptr;
|
||||
|
||||
if(size>10000)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"save_float_file faile due to size=%d\r\n",size);
|
||||
return -1;
|
||||
}
|
||||
|
||||
data_ptr=(unsigned char *)ptr;
|
||||
for(i=0;i<(size/2);i++)
|
||||
{
|
||||
file_buf[i]=(float)((*data_ptr)+256*(*(data_ptr+1)));
|
||||
data_ptr+=2;
|
||||
}
|
||||
fp=fopen(file,"w");
|
||||
if(fp==NULL)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"Creat file %s failed when savefile\r\n",file);
|
||||
return -2;
|
||||
}
|
||||
if(offs!=0)
|
||||
{
|
||||
fseek(fp,offs,SEEK_SET);
|
||||
}
|
||||
if(fwrite((const void *)file_buf,2*size,1,fp)!=1)
|
||||
{
|
||||
fclose(fp);
|
||||
LOG_DEBUG(ERROR_DEBUG,"Write file %s failed when savefile\r\n",file);
|
||||
return -3;
|
||||
}
|
||||
fclose(fp);
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
void RawConvVolt(int tmp,float *volt)
|
||||
{
|
||||
float temp;
|
||||
temp=((VIN*tmp)/65536-GND_OFFS)/AMP+((MCU_VREF*my_para_data.mach_run_para.sample_offs)/4096);
|
||||
if(volt!=NULL)
|
||||
*volt=temp;
|
||||
}
|
||||
|
||||
/*
|
||||
//采样数据转换成电压再存成二进制浮点数
|
||||
int save_float_file_ex(const char *file,long offs,void *ptr,unsigned int size)
|
||||
{
|
||||
static float file_buf[5000];
|
||||
int tmp;
|
||||
int i;
|
||||
FILE *fp;
|
||||
unsigned char *data_ptr;
|
||||
|
||||
if(size>10000)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"save_float_file_ex faile due to size=%d\r\n",size);
|
||||
return -1;
|
||||
}
|
||||
|
||||
data_ptr=(unsigned char *)ptr;
|
||||
for(i=0;i<(size/2);i++)
|
||||
{
|
||||
tmp=(int)256*(*(data_ptr+1))+(*data_ptr);
|
||||
RawConvVolt(tmp,&file_buf[i]);
|
||||
data_ptr+=2;
|
||||
}
|
||||
fp=fopen(file,"w");
|
||||
if(fp==NULL)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"Creat file %s failed when savefile\r\n",file);
|
||||
return -2;
|
||||
}
|
||||
if(offs!=0)
|
||||
{
|
||||
fseek(fp,offs,SEEK_SET);
|
||||
}
|
||||
if(fwrite((const void *)file_buf,2*size,1,fp)!=1)
|
||||
{
|
||||
fclose(fp);
|
||||
LOG_DEBUG(ERROR_DEBUG,"Write file %s failed when savefile\r\n",file);
|
||||
return -3;
|
||||
}
|
||||
fclose(fp);
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
int save_csv_file(const char *file,long offs,void *ptr,unsigned int size)
|
||||
{
|
||||
FILE *fp;
|
||||
unsigned int i;
|
||||
int tmp;
|
||||
unsigned char *data_ptr;
|
||||
//float voltage;
|
||||
data_ptr=(unsigned char *)ptr;
|
||||
fp=fopen(file,"w");
|
||||
if(fp==NULL)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"Creat file %s failed when savefile\r\n",file);
|
||||
return -1;
|
||||
}
|
||||
if(offs!=0)
|
||||
{
|
||||
fseek(fp,offs,SEEK_SET);
|
||||
}
|
||||
for(i=0;i<(size/2);i++)
|
||||
{
|
||||
tmp=(int)256*(*(data_ptr+1))+(*data_ptr);
|
||||
//RawConvVolt(tmp,&voltage);
|
||||
fprintf(fp,"%d\n",tmp);
|
||||
data_ptr+=2;
|
||||
}
|
||||
fprintf(fp,"\n");
|
||||
fclose(fp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//保存数据,len为字节长度
|
||||
int save_sample_data(unsigned int len)
|
||||
{
|
||||
int ret;
|
||||
char *my_file_name;
|
||||
time_t now;
|
||||
|
||||
now=time(NULL);
|
||||
last_sample_time=now;
|
||||
|
||||
my_file_name=make_data_file_name(now,0);//创建bin文件名
|
||||
|
||||
if((ret=save_hex_file(my_file_name,0,(void *)data_buf,len))!=0)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"save bin file failed %s\n",my_file_name);
|
||||
return -1;
|
||||
}
|
||||
/*if(ret=save_float_file_ex(my_file_name,0,(void *)data_buf,len)!=0)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"save float file failed %s\n",my_file_name);
|
||||
return -1;
|
||||
}*/
|
||||
|
||||
if(send_analysis_req(my_file_name,strlen(my_file_name))!=0)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"Send analysis request failed:file name is %s\n",my_file_name);
|
||||
return -2;
|
||||
}
|
||||
|
||||
my_file_name=make_data_file_name(now,1);//创建csv文件名
|
||||
if((ret=save_csv_file(my_file_name,0,(void *)data_buf,len))!=0)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"save csv file failed %s\n",my_file_name);
|
||||
return -3;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
//保存数据,len为字节长度
|
||||
int save_co2_data(unsigned int len)
|
||||
{
|
||||
extern int analysis_co2(unsigned short *buf,unsigned int buf_len,float *result);
|
||||
int ret=0;
|
||||
char *my_file_name;
|
||||
time_t now;
|
||||
float co2_ppm;
|
||||
|
||||
now=time(NULL);
|
||||
//last_sample_time=now;
|
||||
if(analysis_co2(data_buf,len,&co2_ppm)==0)
|
||||
{
|
||||
last_co2_ppm=co2_ppm;
|
||||
co2_is_ok=1;
|
||||
LOG_DEBUG(TRACE_DEBUG,"analysis co2=%fppm\n",co2_ppm);
|
||||
}
|
||||
else
|
||||
{
|
||||
// last_co2_ppm=0;
|
||||
last_co2_ppm=co2_ppm;//2015-11-11直线的时候以基线为测量值
|
||||
co2_is_ok=0;
|
||||
LOG_DEBUG(ERROR_DEBUG,"analysis co2 failed co2=%fppm\n",co2_ppm);
|
||||
}
|
||||
my_file_name=make_data_file_name(now,2);//创建co2文件名
|
||||
if((ret=save_hex_file(my_file_name,0,(void *)data_buf,len))!=0)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"save bin file failed %s\n",my_file_name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
my_file_name=make_data_file_name(now,3);//创建csv文件名
|
||||
if((ret=save_csv_file(my_file_name,0,(void *)data_buf,len))!=0)
|
||||
{
|
||||
LOG_DEBUG(ERROR_DEBUG,"save csv file failed %s\n",my_file_name);
|
||||
return -2;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,42 @@
|
||||
#ifndef _SMAPLE_PROCESS_H
|
||||
#define _SMAPLE_PROCESS_H
|
||||
|
||||
|
||||
#define CMD_NORMAL_READ 1
|
||||
#define CMD_READ_SAMPLE 2
|
||||
#define CMD_CLR_DATA 3
|
||||
#define CMD_START_SAMPLE 4
|
||||
#define CMD_STOP_SAMPLE 5
|
||||
#define CMD_READ_CO2 6
|
||||
#define CMD_CLR_CO2 7
|
||||
#define CMD_SYS_RESET 8
|
||||
|
||||
#define SUCCESSFULL 0x5A
|
||||
#define FAILURE 0xA5
|
||||
|
||||
#define SEGMENT_LENGTH 500
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned short len;
|
||||
unsigned short intval;
|
||||
unsigned short offs;
|
||||
unsigned short co2_pos;
|
||||
unsigned short co2_len;
|
||||
}SAMPLE_PARA_TYPE;
|
||||
|
||||
extern unsigned int clear_sample_data(void);
|
||||
extern int start_sample_data(unsigned int ch,SAMPLE_PARA_TYPE *sample_para);
|
||||
extern int start_sample_heat(unsigned char ch,unsigned char flg);
|
||||
extern unsigned int read_sample_data(unsigned int total_len);
|
||||
extern int save_sample_data(unsigned int len);
|
||||
extern unsigned int query_sample_data(unsigned char *ret_data,int len);
|
||||
extern unsigned int clear_co2_data(void);
|
||||
extern unsigned int read_co2_data(unsigned int total_len);
|
||||
extern int save_co2_data(unsigned int len);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -0,0 +1,137 @@
|
||||
#ifndef _SHM_H
|
||||
#define _SHM_H
|
||||
|
||||
|
||||
#define TYPE_MX 1
|
||||
#define TYPE_ST 2
|
||||
#define TYPE_SE 3
|
||||
#define TYPE_SG 4
|
||||
#define TYPE_SGCB 5
|
||||
#define TYPE_CO 6
|
||||
#define TYPE_SP 7
|
||||
#define TYPE_SV 8
|
||||
|
||||
#define CMD_WR_MX 1
|
||||
#define CMD_WR_ST 2
|
||||
#define CMD_WR_SE 3
|
||||
#define CMD_WR_SG 4
|
||||
#define CMD_WR_SGCB 5
|
||||
#define CMD_WR_CO 6
|
||||
#define CMD_WR_SP 7
|
||||
#define CMD_WR_SV 8
|
||||
|
||||
typedef union
|
||||
{
|
||||
float f;
|
||||
int i;
|
||||
char stVal;
|
||||
void *ptr;
|
||||
}GEN_VAL;
|
||||
|
||||
typedef struct{
|
||||
unsigned int secs;
|
||||
unsigned int ms;
|
||||
}TimeStamp;
|
||||
|
||||
|
||||
typedef struct utc_time_tag
|
||||
{
|
||||
unsigned int secs; // Number of seconds since January 1, 1970
|
||||
unsigned int fraction; // Fraction of a second
|
||||
unsigned int qflags; // Quality flags, 8 least-significant bits only
|
||||
} UTC_TIME;
|
||||
|
||||
|
||||
typedef struct{
|
||||
GEN_VAL v;
|
||||
int q;
|
||||
TimeStamp t;
|
||||
//#ifdef SUB_ENABLE
|
||||
int subEna;
|
||||
GEN_VAL subVal;
|
||||
int subQ;
|
||||
//#endif
|
||||
}SCL_MV; //该结构在共享内存区
|
||||
|
||||
|
||||
typedef struct{
|
||||
GEN_VAL v;
|
||||
int q;
|
||||
TimeStamp t;
|
||||
}USR_MV; //该结构在共享内存区
|
||||
|
||||
|
||||
typedef struct{
|
||||
GEN_VAL ctlVal;
|
||||
char ctlNum;
|
||||
TimeStamp t;
|
||||
char Test;
|
||||
char Check;
|
||||
int valType;
|
||||
}SCL_CO;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned char NumOfSG; //1-n
|
||||
unsigned char ActSG; //1-n
|
||||
unsigned char EditSG; //0-n,0
|
||||
unsigned char CnfEdit;
|
||||
UTC_TIME LActTm;// TimeStamp
|
||||
}SGCB_CTRL;
|
||||
|
||||
|
||||
typedef union
|
||||
{
|
||||
USR_MV ana_mv;
|
||||
SCL_MV scl_mv;
|
||||
SCL_CO scl_co;
|
||||
SGCB_CTRL sgcb_ctrl;
|
||||
}SCL_VAL;//通用DO
|
||||
|
||||
|
||||
typedef struct{
|
||||
int type; //该USER_MAP的类型编码种类,既表示该编码是MX类型的还是ST类型的,还是CO类型的
|
||||
int grp; //组号,用于指示在哪个共享内存区
|
||||
int num; //偏移,用于指示在共享内存区的第off_num个SCL_MX结构
|
||||
int ofs; //v,q,t分别用0,1,2表示
|
||||
GEN_VAL v;
|
||||
}SCL_DATA_SPEC;
|
||||
|
||||
typedef struct{
|
||||
int cmd;
|
||||
union
|
||||
{
|
||||
SCL_DATA_SPEC data_spec;
|
||||
}u;
|
||||
}SCL_MSG_TYPE;
|
||||
|
||||
|
||||
int start_scl_mem();
|
||||
int stop_scl_mem();
|
||||
void lock_scl_mem();
|
||||
void unlock_scl_mem();
|
||||
|
||||
|
||||
char *put_scl_data(int grp,int index,void *ptr,int num_bytes);
|
||||
char *get_scl_data(int grp,int index,void *ptr,int num_bytes);
|
||||
|
||||
SCL_VAL* put_mv_data(int grp,int index,USR_MV *usr_mv,int num_do);
|
||||
SCL_VAL* get_mv_data(int grp,int index,USR_MV *usr_data,int num_do);
|
||||
SCL_VAL *put_do_data(int grp,int index,SCL_VAL *scl_do,int num_of_do);
|
||||
SCL_VAL *get_do_data(int grp,int index,SCL_VAL *scl_do,int num_of_do);
|
||||
|
||||
SGCB_CTRL* get_sgcb_data(int index,SGCB_CTRL *sgcb);
|
||||
SGCB_CTRL* put_sgcb_data(int index,SGCB_CTRL *sgcb);
|
||||
char *get_sg_data(int grp,int index,char *ptr,int num_bytes);
|
||||
char *put_sg_data(int grp,int index,char *ptr,int num_bytes);
|
||||
char *get_se_data(int grp,int index,char *ptr,int num_bytes);
|
||||
char *put_se_data(int grp,int index,char *ptr,int num_bytes);
|
||||
|
||||
int get_usr_data(int offs,void *ptr,int num_bytes);
|
||||
int put_usr_data(int offs,void *ptr,int num_bytes);
|
||||
|
||||
int write_scl_msg(int cmd,SCL_DATA_SPEC *data_spec);
|
||||
|
||||
|
||||
#endif
|
||||
|
Binary file not shown.
@ -0,0 +1,17 @@
|
||||
#ifndef _SERIAL_H
|
||||
#define _SERIAL_H
|
||||
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <termios.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int SerialOpen(const char *dev_name,int baud);
|
||||
int SerialRead(int m_comFd,unsigned char *buf,int sz,int timeout);
|
||||
int SerialWrite(int m_comFd,const unsigned char *buf,int sz);
|
||||
int SerialReadEx(int m_comFd,unsigned char *buf,int sz,int timeout);
|
||||
|
||||
#endif
|
@ -0,0 +1,501 @@
|
||||
0
|
||||
0
|
||||
2
|
||||
2
|
||||
1
|
||||
4
|
||||
7
|
||||
1
|
||||
-4
|
||||
-1
|
||||
2
|
||||
1
|
||||
2
|
||||
8
|
||||
2
|
||||
-2
|
||||
-1
|
||||
-3
|
||||
-3
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
-1
|
||||
-1
|
||||
0
|
||||
1
|
||||
6
|
||||
46
|
||||
106
|
||||
117
|
||||
67
|
||||
-12
|
||||
-71
|
||||
-72
|
||||
-52
|
||||
-35
|
||||
-24
|
||||
-12
|
||||
-4
|
||||
0
|
||||
-2
|
||||
-3
|
||||
-7
|
||||
-9
|
||||
-6
|
||||
-3
|
||||
-4
|
||||
-5
|
||||
-5
|
||||
-3
|
||||
-3
|
||||
-2
|
||||
0
|
||||
0
|
||||
1
|
||||
2
|
||||
2
|
||||
-1
|
||||
0
|
||||
2
|
||||
5
|
||||
6
|
||||
5
|
||||
0
|
||||
-2
|
||||
-5
|
||||
-3
|
||||
-1
|
||||
1
|
||||
0
|
||||
1
|
||||
1
|
||||
0
|
||||
-1
|
||||
0
|
||||
0
|
||||
-1
|
||||
0
|
||||
1
|
||||
-2
|
||||
-2
|
||||
0
|
||||
1
|
||||
1
|
||||
1
|
||||
3
|
||||
5
|
||||
2
|
||||
1
|
||||
-1
|
||||
-1
|
||||
-2
|
||||
-1
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
1
|
||||
-1
|
||||
0
|
||||
1
|
||||
3
|
||||
4
|
||||
3
|
||||
0
|
||||
1
|
||||
2
|
||||
1
|
||||
2
|
||||
2
|
||||
1
|
||||
3
|
||||
1
|
||||
-1
|
||||
0
|
||||
1
|
||||
1
|
||||
1
|
||||
3
|
||||
3
|
||||
0
|
||||
0
|
||||
2
|
||||
1
|
||||
2
|
||||
2
|
||||
0
|
||||
-1
|
||||
1
|
||||
3
|
||||
1
|
||||
2
|
||||
1
|
||||
2
|
||||
1
|
||||
1
|
||||
2
|
||||
3
|
||||
0
|
||||
-1
|
||||
3
|
||||
2
|
||||
0
|
||||
1
|
||||
2
|
||||
4
|
||||
1
|
||||
1
|
||||
0
|
||||
2
|
||||
1
|
||||
2
|
||||
3
|
||||
2
|
||||
2
|
||||
1
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
1
|
||||
0
|
||||
2
|
||||
3
|
||||
1
|
||||
0
|
||||
3
|
||||
2
|
||||
1
|
||||
0
|
||||
1
|
||||
2
|
||||
5
|
||||
3
|
||||
1
|
||||
1
|
||||
1
|
||||
2
|
||||
2
|
||||
2
|
||||
3
|
||||
4
|
||||
3
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
3
|
||||
3
|
||||
2
|
||||
0
|
||||
2
|
||||
2
|
||||
0
|
||||
0
|
||||
2
|
||||
2
|
||||
0
|
||||
3
|
||||
1
|
||||
2
|
||||
2
|
||||
2
|
||||
3
|
||||
3
|
||||
1
|
||||
1
|
||||
0
|
||||
2
|
||||
4
|
||||
3
|
||||
1
|
||||
1
|
||||
1
|
||||
2
|
||||
2
|
||||
1
|
||||
3
|
||||
3
|
||||
3
|
||||
1
|
||||
0
|
||||
0
|
||||
3
|
||||
3
|
||||
0
|
||||
0
|
||||
2
|
||||
2
|
||||
1
|
||||
3
|
||||
4
|
||||
3
|
||||
1
|
||||
3
|
||||
4
|
||||
4
|
||||
7
|
||||
9
|
||||
9
|
||||
11
|
||||
9
|
||||
5
|
||||
4
|
||||
2
|
||||
-1
|
||||
-2
|
||||
-4
|
||||
-4
|
||||
-4
|
||||
-3
|
||||
-2
|
||||
-1
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
1
|
||||
1
|
||||
2
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
1
|
||||
1
|
||||
1
|
||||
2
|
||||
2
|
||||
4
|
||||
3
|
||||
2
|
||||
1
|
||||
1
|
||||
2
|
||||
2
|
||||
1
|
||||
1
|
||||
1
|
||||
2
|
||||
3
|
||||
2
|
||||
1
|
||||
1
|
||||
3
|
||||
3
|
||||
1
|
||||
2
|
||||
2
|
||||
2
|
||||
3
|
||||
2
|
||||
2
|
||||
2
|
||||
0
|
||||
3
|
||||
2
|
||||
4
|
||||
2
|
||||
2
|
||||
4
|
||||
4
|
||||
4
|
||||
6
|
||||
5
|
||||
5
|
||||
6
|
||||
6
|
||||
6
|
||||
4
|
||||
4
|
||||
2
|
||||
2
|
||||
1
|
||||
0
|
||||
-2
|
||||
-2
|
||||
-2
|
||||
-1
|
||||
-1
|
||||
-2
|
||||
-1
|
||||
-1
|
||||
0
|
||||
1
|
||||
0
|
||||
1
|
||||
2
|
||||
1
|
||||
1
|
||||
2
|
||||
0
|
||||
3
|
||||
3
|
||||
2
|
||||
1
|
||||
1
|
||||
2
|
||||
-1
|
||||
0
|
||||
2
|
||||
2
|
||||
1
|
||||
2
|
||||
2
|
||||
3
|
||||
1
|
||||
1
|
||||
2
|
||||
3
|
||||
1
|
||||
1
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
3
|
||||
2
|
||||
1
|
||||
1
|
||||
1
|
||||
3
|
||||
1
|
||||
3
|
||||
3
|
||||
1
|
||||
2
|
||||
2
|
||||
2
|
||||
3
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
5
|
||||
2
|
||||
4
|
||||
5
|
||||
4
|
||||
2
|
||||
2
|
||||
0
|
||||
-2
|
||||
-1
|
||||
-1
|
||||
-2
|
||||
-3
|
||||
-1
|
||||
1
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
2
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
2
|
||||
2
|
||||
1
|
||||
2
|
||||
1
|
||||
1
|
||||
2
|
||||
1
|
||||
0
|
||||
1
|
||||
2
|
||||
1
|
||||
0
|
||||
2
|
||||
1
|
||||
2
|
||||
3
|
||||
2
|
||||
1
|
||||
1
|
||||
1
|
||||
3
|
||||
1
|
||||
1
|
||||
-1
|
||||
-1
|
||||
-1
|
||||
1
|
||||
1
|
||||
1
|
||||
2
|
||||
2
|
||||
2
|
||||
1
|
||||
-1
|
||||
-1
|
||||
0
|
||||
0
|
||||
1
|
||||
2
|
||||
1
|
||||
0
|
||||
1
|
||||
1
|
||||
3
|
||||
2
|
||||
3
|
||||
1
|
||||
-2
|
||||
0
|
||||
0
|
||||
0
|
||||
2
|
||||
2
|
||||
0
|
||||
0
|
||||
1
|
||||
2
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
2
|
||||
2
|
||||
0
|
||||
1
|
||||
1
|
||||
3
|
||||
1
|
||||
1
|
||||
0
|
||||
1
|
||||
1
|
||||
1
|
||||
0
|
||||
1
|
||||
1
|
||||
0
|
||||
1
|
||||
2
|
||||
1
|
||||
1
|
||||
-2
|
||||
0
|
||||
1
|
||||
2
|
||||
1
|
||||
2
|
||||
-1
|
||||
0
|
||||
0
|
||||
2
|
||||
1
|
||||
-1
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,517 @@
|
||||
/*
|
||||
** 2006 June 7
|
||||
**
|
||||
** The author disclaims copyright to this source code. In place of
|
||||
** a legal notice, here is a blessing:
|
||||
**
|
||||
** May you do good and not evil.
|
||||
** May you find forgiveness for yourself and forgive others.
|
||||
** May you share freely, never taking more than you give.
|
||||
**
|
||||
*************************************************************************
|
||||
** This header file defines the SQLite interface for use by
|
||||
** shared libraries that want to be imported as extensions into
|
||||
** an SQLite instance. Shared libraries that intend to be loaded
|
||||
** as extensions by SQLite should #include this file instead of
|
||||
** sqlite3.h.
|
||||
*/
|
||||
#ifndef _SQLITE3EXT_H_
|
||||
#define _SQLITE3EXT_H_
|
||||
#include "sqlite3.h"
|
||||
|
||||
typedef struct sqlite3_api_routines sqlite3_api_routines;
|
||||
|
||||
/*
|
||||
** The following structure holds pointers to all of the SQLite API
|
||||
** routines.
|
||||
**
|
||||
** WARNING: In order to maintain backwards compatibility, add new
|
||||
** interfaces to the end of this structure only. If you insert new
|
||||
** interfaces in the middle of this structure, then older different
|
||||
** versions of SQLite will not be able to load each other's shared
|
||||
** libraries!
|
||||
*/
|
||||
struct sqlite3_api_routines {
|
||||
void * (*aggregate_context)(sqlite3_context*,int nBytes);
|
||||
int (*aggregate_count)(sqlite3_context*);
|
||||
int (*bind_blob)(sqlite3_stmt*,int,const void*,int n,void(*)(void*));
|
||||
int (*bind_double)(sqlite3_stmt*,int,double);
|
||||
int (*bind_int)(sqlite3_stmt*,int,int);
|
||||
int (*bind_int64)(sqlite3_stmt*,int,sqlite_int64);
|
||||
int (*bind_null)(sqlite3_stmt*,int);
|
||||
int (*bind_parameter_count)(sqlite3_stmt*);
|
||||
int (*bind_parameter_index)(sqlite3_stmt*,const char*zName);
|
||||
const char * (*bind_parameter_name)(sqlite3_stmt*,int);
|
||||
int (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*));
|
||||
int (*bind_text16)(sqlite3_stmt*,int,const void*,int,void(*)(void*));
|
||||
int (*bind_value)(sqlite3_stmt*,int,const sqlite3_value*);
|
||||
int (*busy_handler)(sqlite3*,int(*)(void*,int),void*);
|
||||
int (*busy_timeout)(sqlite3*,int ms);
|
||||
int (*changes)(sqlite3*);
|
||||
int (*close)(sqlite3*);
|
||||
int (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,
|
||||
int eTextRep,const char*));
|
||||
int (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,
|
||||
int eTextRep,const void*));
|
||||
const void * (*column_blob)(sqlite3_stmt*,int iCol);
|
||||
int (*column_bytes)(sqlite3_stmt*,int iCol);
|
||||
int (*column_bytes16)(sqlite3_stmt*,int iCol);
|
||||
int (*column_count)(sqlite3_stmt*pStmt);
|
||||
const char * (*column_database_name)(sqlite3_stmt*,int);
|
||||
const void * (*column_database_name16)(sqlite3_stmt*,int);
|
||||
const char * (*column_decltype)(sqlite3_stmt*,int i);
|
||||
const void * (*column_decltype16)(sqlite3_stmt*,int);
|
||||
double (*column_double)(sqlite3_stmt*,int iCol);
|
||||
int (*column_int)(sqlite3_stmt*,int iCol);
|
||||
sqlite_int64 (*column_int64)(sqlite3_stmt*,int iCol);
|
||||
const char * (*column_name)(sqlite3_stmt*,int);
|
||||
const void * (*column_name16)(sqlite3_stmt*,int);
|
||||
const char * (*column_origin_name)(sqlite3_stmt*,int);
|
||||
const void * (*column_origin_name16)(sqlite3_stmt*,int);
|
||||
const char * (*column_table_name)(sqlite3_stmt*,int);
|
||||
const void * (*column_table_name16)(sqlite3_stmt*,int);
|
||||
const unsigned char * (*column_text)(sqlite3_stmt*,int iCol);
|
||||
const void * (*column_text16)(sqlite3_stmt*,int iCol);
|
||||
int (*column_type)(sqlite3_stmt*,int iCol);
|
||||
sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol);
|
||||
void * (*commit_hook)(sqlite3*,int(*)(void*),void*);
|
||||
int (*complete)(const char*sql);
|
||||
int (*complete16)(const void*sql);
|
||||
int (*create_collation)(sqlite3*,const char*,int,void*,
|
||||
int(*)(void*,int,const void*,int,const void*));
|
||||
int (*create_collation16)(sqlite3*,const void*,int,void*,
|
||||
int(*)(void*,int,const void*,int,const void*));
|
||||
int (*create_function)(sqlite3*,const char*,int,int,void*,
|
||||
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xFinal)(sqlite3_context*));
|
||||
int (*create_function16)(sqlite3*,const void*,int,int,void*,
|
||||
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xFinal)(sqlite3_context*));
|
||||
int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);
|
||||
int (*data_count)(sqlite3_stmt*pStmt);
|
||||
sqlite3 * (*db_handle)(sqlite3_stmt*);
|
||||
int (*declare_vtab)(sqlite3*,const char*);
|
||||
int (*enable_shared_cache)(int);
|
||||
int (*errcode)(sqlite3*db);
|
||||
const char * (*errmsg)(sqlite3*);
|
||||
const void * (*errmsg16)(sqlite3*);
|
||||
int (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**);
|
||||
int (*expired)(sqlite3_stmt*);
|
||||
int (*finalize)(sqlite3_stmt*pStmt);
|
||||
void (*free)(void*);
|
||||
void (*free_table)(char**result);
|
||||
int (*get_autocommit)(sqlite3*);
|
||||
void * (*get_auxdata)(sqlite3_context*,int);
|
||||
int (*get_table)(sqlite3*,const char*,char***,int*,int*,char**);
|
||||
int (*global_recover)(void);
|
||||
void (*interruptx)(sqlite3*);
|
||||
sqlite_int64 (*last_insert_rowid)(sqlite3*);
|
||||
const char * (*libversion)(void);
|
||||
int (*libversion_number)(void);
|
||||
void *(*malloc)(int);
|
||||
char * (*mprintf)(const char*,...);
|
||||
int (*open)(const char*,sqlite3**);
|
||||
int (*open16)(const void*,sqlite3**);
|
||||
int (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
|
||||
int (*prepare16)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
|
||||
void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_uint64),void*);
|
||||
void (*progress_handler)(sqlite3*,int,int(*)(void*),void*);
|
||||
void *(*realloc)(void*,int);
|
||||
int (*reset)(sqlite3_stmt*pStmt);
|
||||
void (*result_blob)(sqlite3_context*,const void*,int,void(*)(void*));
|
||||
void (*result_double)(sqlite3_context*,double);
|
||||
void (*result_error)(sqlite3_context*,const char*,int);
|
||||
void (*result_error16)(sqlite3_context*,const void*,int);
|
||||
void (*result_int)(sqlite3_context*,int);
|
||||
void (*result_int64)(sqlite3_context*,sqlite_int64);
|
||||
void (*result_null)(sqlite3_context*);
|
||||
void (*result_text)(sqlite3_context*,const char*,int,void(*)(void*));
|
||||
void (*result_text16)(sqlite3_context*,const void*,int,void(*)(void*));
|
||||
void (*result_text16be)(sqlite3_context*,const void*,int,void(*)(void*));
|
||||
void (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*));
|
||||
void (*result_value)(sqlite3_context*,sqlite3_value*);
|
||||
void * (*rollback_hook)(sqlite3*,void(*)(void*),void*);
|
||||
int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,
|
||||
const char*,const char*),void*);
|
||||
void (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*));
|
||||
char * (*snprintf)(int,char*,const char*,...);
|
||||
int (*step)(sqlite3_stmt*);
|
||||
int (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,
|
||||
char const**,char const**,int*,int*,int*);
|
||||
void (*thread_cleanup)(void);
|
||||
int (*total_changes)(sqlite3*);
|
||||
void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);
|
||||
int (*transfer_bindings)(sqlite3_stmt*,sqlite3_stmt*);
|
||||
void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,
|
||||
sqlite_int64),void*);
|
||||
void * (*user_data)(sqlite3_context*);
|
||||
const void * (*value_blob)(sqlite3_value*);
|
||||
int (*value_bytes)(sqlite3_value*);
|
||||
int (*value_bytes16)(sqlite3_value*);
|
||||
double (*value_double)(sqlite3_value*);
|
||||
int (*value_int)(sqlite3_value*);
|
||||
sqlite_int64 (*value_int64)(sqlite3_value*);
|
||||
int (*value_numeric_type)(sqlite3_value*);
|
||||
const unsigned char * (*value_text)(sqlite3_value*);
|
||||
const void * (*value_text16)(sqlite3_value*);
|
||||
const void * (*value_text16be)(sqlite3_value*);
|
||||
const void * (*value_text16le)(sqlite3_value*);
|
||||
int (*value_type)(sqlite3_value*);
|
||||
char *(*vmprintf)(const char*,va_list);
|
||||
/* Added ??? */
|
||||
int (*overload_function)(sqlite3*, const char *zFuncName, int nArg);
|
||||
/* Added by 3.3.13 */
|
||||
int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
|
||||
int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
|
||||
int (*clear_bindings)(sqlite3_stmt*);
|
||||
/* Added by 3.4.1 */
|
||||
int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,
|
||||
void (*xDestroy)(void *));
|
||||
/* Added by 3.5.0 */
|
||||
int (*bind_zeroblob)(sqlite3_stmt*,int,int);
|
||||
int (*blob_bytes)(sqlite3_blob*);
|
||||
int (*blob_close)(sqlite3_blob*);
|
||||
int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,
|
||||
int,sqlite3_blob**);
|
||||
int (*blob_read)(sqlite3_blob*,void*,int,int);
|
||||
int (*blob_write)(sqlite3_blob*,const void*,int,int);
|
||||
int (*create_collation_v2)(sqlite3*,const char*,int,void*,
|
||||
int(*)(void*,int,const void*,int,const void*),
|
||||
void(*)(void*));
|
||||
int (*file_control)(sqlite3*,const char*,int,void*);
|
||||
sqlite3_int64 (*memory_highwater)(int);
|
||||
sqlite3_int64 (*memory_used)(void);
|
||||
sqlite3_mutex *(*mutex_alloc)(int);
|
||||
void (*mutex_enter)(sqlite3_mutex*);
|
||||
void (*mutex_free)(sqlite3_mutex*);
|
||||
void (*mutex_leave)(sqlite3_mutex*);
|
||||
int (*mutex_try)(sqlite3_mutex*);
|
||||
int (*open_v2)(const char*,sqlite3**,int,const char*);
|
||||
int (*release_memory)(int);
|
||||
void (*result_error_nomem)(sqlite3_context*);
|
||||
void (*result_error_toobig)(sqlite3_context*);
|
||||
int (*sleep)(int);
|
||||
void (*soft_heap_limit)(int);
|
||||
sqlite3_vfs *(*vfs_find)(const char*);
|
||||
int (*vfs_register)(sqlite3_vfs*,int);
|
||||
int (*vfs_unregister)(sqlite3_vfs*);
|
||||
int (*xthreadsafe)(void);
|
||||
void (*result_zeroblob)(sqlite3_context*,int);
|
||||
void (*result_error_code)(sqlite3_context*,int);
|
||||
int (*test_control)(int, ...);
|
||||
void (*randomness)(int,void*);
|
||||
sqlite3 *(*context_db_handle)(sqlite3_context*);
|
||||
int (*extended_result_codes)(sqlite3*,int);
|
||||
int (*limit)(sqlite3*,int,int);
|
||||
sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*);
|
||||
const char *(*sql)(sqlite3_stmt*);
|
||||
int (*status)(int,int*,int*,int);
|
||||
int (*backup_finish)(sqlite3_backup*);
|
||||
sqlite3_backup *(*backup_init)(sqlite3*,const char*,sqlite3*,const char*);
|
||||
int (*backup_pagecount)(sqlite3_backup*);
|
||||
int (*backup_remaining)(sqlite3_backup*);
|
||||
int (*backup_step)(sqlite3_backup*,int);
|
||||
const char *(*compileoption_get)(int);
|
||||
int (*compileoption_used)(const char*);
|
||||
int (*create_function_v2)(sqlite3*,const char*,int,int,void*,
|
||||
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xFinal)(sqlite3_context*),
|
||||
void(*xDestroy)(void*));
|
||||
int (*db_config)(sqlite3*,int,...);
|
||||
sqlite3_mutex *(*db_mutex)(sqlite3*);
|
||||
int (*db_status)(sqlite3*,int,int*,int*,int);
|
||||
int (*extended_errcode)(sqlite3*);
|
||||
void (*log)(int,const char*,...);
|
||||
sqlite3_int64 (*soft_heap_limit64)(sqlite3_int64);
|
||||
const char *(*sourceid)(void);
|
||||
int (*stmt_status)(sqlite3_stmt*,int,int);
|
||||
int (*strnicmp)(const char*,const char*,int);
|
||||
int (*unlock_notify)(sqlite3*,void(*)(void**,int),void*);
|
||||
int (*wal_autocheckpoint)(sqlite3*,int);
|
||||
int (*wal_checkpoint)(sqlite3*,const char*);
|
||||
void *(*wal_hook)(sqlite3*,int(*)(void*,sqlite3*,const char*,int),void*);
|
||||
int (*blob_reopen)(sqlite3_blob*,sqlite3_int64);
|
||||
int (*vtab_config)(sqlite3*,int op,...);
|
||||
int (*vtab_on_conflict)(sqlite3*);
|
||||
/* Version 3.7.16 and later */
|
||||
int (*close_v2)(sqlite3*);
|
||||
const char *(*db_filename)(sqlite3*,const char*);
|
||||
int (*db_readonly)(sqlite3*,const char*);
|
||||
int (*db_release_memory)(sqlite3*);
|
||||
const char *(*errstr)(int);
|
||||
int (*stmt_busy)(sqlite3_stmt*);
|
||||
int (*stmt_readonly)(sqlite3_stmt*);
|
||||
int (*stricmp)(const char*,const char*);
|
||||
int (*uri_boolean)(const char*,const char*,int);
|
||||
sqlite3_int64 (*uri_int64)(const char*,const char*,sqlite3_int64);
|
||||
const char *(*uri_parameter)(const char*,const char*);
|
||||
char *(*vsnprintf)(int,char*,const char*,va_list);
|
||||
int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*);
|
||||
/* Version 3.8.7 and later */
|
||||
int (*auto_extension)(void(*)(void));
|
||||
int (*bind_blob64)(sqlite3_stmt*,int,const void*,sqlite3_uint64,
|
||||
void(*)(void*));
|
||||
int (*bind_text64)(sqlite3_stmt*,int,const char*,sqlite3_uint64,
|
||||
void(*)(void*),unsigned char);
|
||||
int (*cancel_auto_extension)(void(*)(void));
|
||||
int (*load_extension)(sqlite3*,const char*,const char*,char**);
|
||||
void *(*malloc64)(sqlite3_uint64);
|
||||
sqlite3_uint64 (*msize)(void*);
|
||||
void *(*realloc64)(void*,sqlite3_uint64);
|
||||
void (*reset_auto_extension)(void);
|
||||
void (*result_blob64)(sqlite3_context*,const void*,sqlite3_uint64,
|
||||
void(*)(void*));
|
||||
void (*result_text64)(sqlite3_context*,const char*,sqlite3_uint64,
|
||||
void(*)(void*), unsigned char);
|
||||
int (*strglob)(const char*,const char*);
|
||||
};
|
||||
|
||||
/*
|
||||
** The following macros redefine the API routines so that they are
|
||||
** redirected through the global sqlite3_api structure.
|
||||
**
|
||||
** This header file is also used by the loadext.c source file
|
||||
** (part of the main SQLite library - not an extension) so that
|
||||
** it can get access to the sqlite3_api_routines structure
|
||||
** definition. But the main library does not want to redefine
|
||||
** the API. So the redefinition macros are only valid if the
|
||||
** SQLITE_CORE macros is undefined.
|
||||
*/
|
||||
#ifndef SQLITE_CORE
|
||||
#define sqlite3_aggregate_context sqlite3_api->aggregate_context
|
||||
#ifndef SQLITE_OMIT_DEPRECATED
|
||||
#define sqlite3_aggregate_count sqlite3_api->aggregate_count
|
||||
#endif
|
||||
#define sqlite3_bind_blob sqlite3_api->bind_blob
|
||||
#define sqlite3_bind_double sqlite3_api->bind_double
|
||||
#define sqlite3_bind_int sqlite3_api->bind_int
|
||||
#define sqlite3_bind_int64 sqlite3_api->bind_int64
|
||||
#define sqlite3_bind_null sqlite3_api->bind_null
|
||||
#define sqlite3_bind_parameter_count sqlite3_api->bind_parameter_count
|
||||
#define sqlite3_bind_parameter_index sqlite3_api->bind_parameter_index
|
||||
#define sqlite3_bind_parameter_name sqlite3_api->bind_parameter_name
|
||||
#define sqlite3_bind_text sqlite3_api->bind_text
|
||||
#define sqlite3_bind_text16 sqlite3_api->bind_text16
|
||||
#define sqlite3_bind_value sqlite3_api->bind_value
|
||||
#define sqlite3_busy_handler sqlite3_api->busy_handler
|
||||
#define sqlite3_busy_timeout sqlite3_api->busy_timeout
|
||||
#define sqlite3_changes sqlite3_api->changes
|
||||
#define sqlite3_close sqlite3_api->close
|
||||
#define sqlite3_collation_needed sqlite3_api->collation_needed
|
||||
#define sqlite3_collation_needed16 sqlite3_api->collation_needed16
|
||||
#define sqlite3_column_blob sqlite3_api->column_blob
|
||||
#define sqlite3_column_bytes sqlite3_api->column_bytes
|
||||
#define sqlite3_column_bytes16 sqlite3_api->column_bytes16
|
||||
#define sqlite3_column_count sqlite3_api->column_count
|
||||
#define sqlite3_column_database_name sqlite3_api->column_database_name
|
||||
#define sqlite3_column_database_name16 sqlite3_api->column_database_name16
|
||||
#define sqlite3_column_decltype sqlite3_api->column_decltype
|
||||
#define sqlite3_column_decltype16 sqlite3_api->column_decltype16
|
||||
#define sqlite3_column_double sqlite3_api->column_double
|
||||
#define sqlite3_column_int sqlite3_api->column_int
|
||||
#define sqlite3_column_int64 sqlite3_api->column_int64
|
||||
#define sqlite3_column_name sqlite3_api->column_name
|
||||
#define sqlite3_column_name16 sqlite3_api->column_name16
|
||||
#define sqlite3_column_origin_name sqlite3_api->column_origin_name
|
||||
#define sqlite3_column_origin_name16 sqlite3_api->column_origin_name16
|
||||
#define sqlite3_column_table_name sqlite3_api->column_table_name
|
||||
#define sqlite3_column_table_name16 sqlite3_api->column_table_name16
|
||||
#define sqlite3_column_text sqlite3_api->column_text
|
||||
#define sqlite3_column_text16 sqlite3_api->column_text16
|
||||
#define sqlite3_column_type sqlite3_api->column_type
|
||||
#define sqlite3_column_value sqlite3_api->column_value
|
||||
#define sqlite3_commit_hook sqlite3_api->commit_hook
|
||||
#define sqlite3_complete sqlite3_api->complete
|
||||
#define sqlite3_complete16 sqlite3_api->complete16
|
||||
#define sqlite3_create_collation sqlite3_api->create_collation
|
||||
#define sqlite3_create_collation16 sqlite3_api->create_collation16
|
||||
#define sqlite3_create_function sqlite3_api->create_function
|
||||
#define sqlite3_create_function16 sqlite3_api->create_function16
|
||||
#define sqlite3_create_module sqlite3_api->create_module
|
||||
#define sqlite3_create_module_v2 sqlite3_api->create_module_v2
|
||||
#define sqlite3_data_count sqlite3_api->data_count
|
||||
#define sqlite3_db_handle sqlite3_api->db_handle
|
||||
#define sqlite3_declare_vtab sqlite3_api->declare_vtab
|
||||
#define sqlite3_enable_shared_cache sqlite3_api->enable_shared_cache
|
||||
#define sqlite3_errcode sqlite3_api->errcode
|
||||
#define sqlite3_errmsg sqlite3_api->errmsg
|
||||
#define sqlite3_errmsg16 sqlite3_api->errmsg16
|
||||
#define sqlite3_exec sqlite3_api->exec
|
||||
#ifndef SQLITE_OMIT_DEPRECATED
|
||||
#define sqlite3_expired sqlite3_api->expired
|
||||
#endif
|
||||
#define sqlite3_finalize sqlite3_api->finalize
|
||||
#define sqlite3_free sqlite3_api->free
|
||||
#define sqlite3_free_table sqlite3_api->free_table
|
||||
#define sqlite3_get_autocommit sqlite3_api->get_autocommit
|
||||
#define sqlite3_get_auxdata sqlite3_api->get_auxdata
|
||||
#define sqlite3_get_table sqlite3_api->get_table
|
||||
#ifndef SQLITE_OMIT_DEPRECATED
|
||||
#define sqlite3_global_recover sqlite3_api->global_recover
|
||||
#endif
|
||||
#define sqlite3_interrupt sqlite3_api->interruptx
|
||||
#define sqlite3_last_insert_rowid sqlite3_api->last_insert_rowid
|
||||
#define sqlite3_libversion sqlite3_api->libversion
|
||||
#define sqlite3_libversion_number sqlite3_api->libversion_number
|
||||
#define sqlite3_malloc sqlite3_api->malloc
|
||||
#define sqlite3_mprintf sqlite3_api->mprintf
|
||||
#define sqlite3_open sqlite3_api->open
|
||||
#define sqlite3_open16 sqlite3_api->open16
|
||||
#define sqlite3_prepare sqlite3_api->prepare
|
||||
#define sqlite3_prepare16 sqlite3_api->prepare16
|
||||
#define sqlite3_prepare_v2 sqlite3_api->prepare_v2
|
||||
#define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
|
||||
#define sqlite3_profile sqlite3_api->profile
|
||||
#define sqlite3_progress_handler sqlite3_api->progress_handler
|
||||
#define sqlite3_realloc sqlite3_api->realloc
|
||||
#define sqlite3_reset sqlite3_api->reset
|
||||
#define sqlite3_result_blob sqlite3_api->result_blob
|
||||
#define sqlite3_result_double sqlite3_api->result_double
|
||||
#define sqlite3_result_error sqlite3_api->result_error
|
||||
#define sqlite3_result_error16 sqlite3_api->result_error16
|
||||
#define sqlite3_result_int sqlite3_api->result_int
|
||||
#define sqlite3_result_int64 sqlite3_api->result_int64
|
||||
#define sqlite3_result_null sqlite3_api->result_null
|
||||
#define sqlite3_result_text sqlite3_api->result_text
|
||||
#define sqlite3_result_text16 sqlite3_api->result_text16
|
||||
#define sqlite3_result_text16be sqlite3_api->result_text16be
|
||||
#define sqlite3_result_text16le sqlite3_api->result_text16le
|
||||
#define sqlite3_result_value sqlite3_api->result_value
|
||||
#define sqlite3_rollback_hook sqlite3_api->rollback_hook
|
||||
#define sqlite3_set_authorizer sqlite3_api->set_authorizer
|
||||
#define sqlite3_set_auxdata sqlite3_api->set_auxdata
|
||||
#define sqlite3_snprintf sqlite3_api->snprintf
|
||||
#define sqlite3_step sqlite3_api->step
|
||||
#define sqlite3_table_column_metadata sqlite3_api->table_column_metadata
|
||||
#define sqlite3_thread_cleanup sqlite3_api->thread_cleanup
|
||||
#define sqlite3_total_changes sqlite3_api->total_changes
|
||||
#define sqlite3_trace sqlite3_api->trace
|
||||
#ifndef SQLITE_OMIT_DEPRECATED
|
||||
#define sqlite3_transfer_bindings sqlite3_api->transfer_bindings
|
||||
#endif
|
||||
#define sqlite3_update_hook sqlite3_api->update_hook
|
||||
#define sqlite3_user_data sqlite3_api->user_data
|
||||
#define sqlite3_value_blob sqlite3_api->value_blob
|
||||
#define sqlite3_value_bytes sqlite3_api->value_bytes
|
||||
#define sqlite3_value_bytes16 sqlite3_api->value_bytes16
|
||||
#define sqlite3_value_double sqlite3_api->value_double
|
||||
#define sqlite3_value_int sqlite3_api->value_int
|
||||
#define sqlite3_value_int64 sqlite3_api->value_int64
|
||||
#define sqlite3_value_numeric_type sqlite3_api->value_numeric_type
|
||||
#define sqlite3_value_text sqlite3_api->value_text
|
||||
#define sqlite3_value_text16 sqlite3_api->value_text16
|
||||
#define sqlite3_value_text16be sqlite3_api->value_text16be
|
||||
#define sqlite3_value_text16le sqlite3_api->value_text16le
|
||||
#define sqlite3_value_type sqlite3_api->value_type
|
||||
#define sqlite3_vmprintf sqlite3_api->vmprintf
|
||||
#define sqlite3_overload_function sqlite3_api->overload_function
|
||||
#define sqlite3_prepare_v2 sqlite3_api->prepare_v2
|
||||
#define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
|
||||
#define sqlite3_clear_bindings sqlite3_api->clear_bindings
|
||||
#define sqlite3_bind_zeroblob sqlite3_api->bind_zeroblob
|
||||
#define sqlite3_blob_bytes sqlite3_api->blob_bytes
|
||||
#define sqlite3_blob_close sqlite3_api->blob_close
|
||||
#define sqlite3_blob_open sqlite3_api->blob_open
|
||||
#define sqlite3_blob_read sqlite3_api->blob_read
|
||||
#define sqlite3_blob_write sqlite3_api->blob_write
|
||||
#define sqlite3_create_collation_v2 sqlite3_api->create_collation_v2
|
||||
#define sqlite3_file_control sqlite3_api->file_control
|
||||
#define sqlite3_memory_highwater sqlite3_api->memory_highwater
|
||||
#define sqlite3_memory_used sqlite3_api->memory_used
|
||||
#define sqlite3_mutex_alloc sqlite3_api->mutex_alloc
|
||||
#define sqlite3_mutex_enter sqlite3_api->mutex_enter
|
||||
#define sqlite3_mutex_free sqlite3_api->mutex_free
|
||||
#define sqlite3_mutex_leave sqlite3_api->mutex_leave
|
||||
#define sqlite3_mutex_try sqlite3_api->mutex_try
|
||||
#define sqlite3_open_v2 sqlite3_api->open_v2
|
||||
#define sqlite3_release_memory sqlite3_api->release_memory
|
||||
#define sqlite3_result_error_nomem sqlite3_api->result_error_nomem
|
||||
#define sqlite3_result_error_toobig sqlite3_api->result_error_toobig
|
||||
#define sqlite3_sleep sqlite3_api->sleep
|
||||
#define sqlite3_soft_heap_limit sqlite3_api->soft_heap_limit
|
||||
#define sqlite3_vfs_find sqlite3_api->vfs_find
|
||||
#define sqlite3_vfs_register sqlite3_api->vfs_register
|
||||
#define sqlite3_vfs_unregister sqlite3_api->vfs_unregister
|
||||
#define sqlite3_threadsafe sqlite3_api->xthreadsafe
|
||||
#define sqlite3_result_zeroblob sqlite3_api->result_zeroblob
|
||||
#define sqlite3_result_error_code sqlite3_api->result_error_code
|
||||
#define sqlite3_test_control sqlite3_api->test_control
|
||||
#define sqlite3_randomness sqlite3_api->randomness
|
||||
#define sqlite3_context_db_handle sqlite3_api->context_db_handle
|
||||
#define sqlite3_extended_result_codes sqlite3_api->extended_result_codes
|
||||
#define sqlite3_limit sqlite3_api->limit
|
||||
#define sqlite3_next_stmt sqlite3_api->next_stmt
|
||||
#define sqlite3_sql sqlite3_api->sql
|
||||
#define sqlite3_status sqlite3_api->status
|
||||
#define sqlite3_backup_finish sqlite3_api->backup_finish
|
||||
#define sqlite3_backup_init sqlite3_api->backup_init
|
||||
#define sqlite3_backup_pagecount sqlite3_api->backup_pagecount
|
||||
#define sqlite3_backup_remaining sqlite3_api->backup_remaining
|
||||
#define sqlite3_backup_step sqlite3_api->backup_step
|
||||
#define sqlite3_compileoption_get sqlite3_api->compileoption_get
|
||||
#define sqlite3_compileoption_used sqlite3_api->compileoption_used
|
||||
#define sqlite3_create_function_v2 sqlite3_api->create_function_v2
|
||||
#define sqlite3_db_config sqlite3_api->db_config
|
||||
#define sqlite3_db_mutex sqlite3_api->db_mutex
|
||||
#define sqlite3_db_status sqlite3_api->db_status
|
||||
#define sqlite3_extended_errcode sqlite3_api->extended_errcode
|
||||
#define sqlite3_log sqlite3_api->log
|
||||
#define sqlite3_soft_heap_limit64 sqlite3_api->soft_heap_limit64
|
||||
#define sqlite3_sourceid sqlite3_api->sourceid
|
||||
#define sqlite3_stmt_status sqlite3_api->stmt_status
|
||||
#define sqlite3_strnicmp sqlite3_api->strnicmp
|
||||
#define sqlite3_unlock_notify sqlite3_api->unlock_notify
|
||||
#define sqlite3_wal_autocheckpoint sqlite3_api->wal_autocheckpoint
|
||||
#define sqlite3_wal_checkpoint sqlite3_api->wal_checkpoint
|
||||
#define sqlite3_wal_hook sqlite3_api->wal_hook
|
||||
#define sqlite3_blob_reopen sqlite3_api->blob_reopen
|
||||
#define sqlite3_vtab_config sqlite3_api->vtab_config
|
||||
#define sqlite3_vtab_on_conflict sqlite3_api->vtab_on_conflict
|
||||
/* Version 3.7.16 and later */
|
||||
#define sqlite3_close_v2 sqlite3_api->close_v2
|
||||
#define sqlite3_db_filename sqlite3_api->db_filename
|
||||
#define sqlite3_db_readonly sqlite3_api->db_readonly
|
||||
#define sqlite3_db_release_memory sqlite3_api->db_release_memory
|
||||
#define sqlite3_errstr sqlite3_api->errstr
|
||||
#define sqlite3_stmt_busy sqlite3_api->stmt_busy
|
||||
#define sqlite3_stmt_readonly sqlite3_api->stmt_readonly
|
||||
#define sqlite3_stricmp sqlite3_api->stricmp
|
||||
#define sqlite3_uri_boolean sqlite3_api->uri_boolean
|
||||
#define sqlite3_uri_int64 sqlite3_api->uri_int64
|
||||
#define sqlite3_uri_parameter sqlite3_api->uri_parameter
|
||||
#define sqlite3_uri_vsnprintf sqlite3_api->vsnprintf
|
||||
#define sqlite3_wal_checkpoint_v2 sqlite3_api->wal_checkpoint_v2
|
||||
/* Version 3.8.7 and later */
|
||||
#define sqlite3_auto_extension sqlite3_api->auto_extension
|
||||
#define sqlite3_bind_blob64 sqlite3_api->bind_blob64
|
||||
#define sqlite3_bind_text64 sqlite3_api->bind_text64
|
||||
#define sqlite3_cancel_auto_extension sqlite3_api->cancel_auto_extension
|
||||
#define sqlite3_load_extension sqlite3_api->load_extension
|
||||
#define sqlite3_malloc64 sqlite3_api->malloc64
|
||||
#define sqlite3_msize sqlite3_api->msize
|
||||
#define sqlite3_realloc64 sqlite3_api->realloc64
|
||||
#define sqlite3_reset_auto_extension sqlite3_api->reset_auto_extension
|
||||
#define sqlite3_result_blob64 sqlite3_api->result_blob64
|
||||
#define sqlite3_result_text64 sqlite3_api->result_text64
|
||||
#define sqlite3_strglob sqlite3_api->strglob
|
||||
#endif /* SQLITE_CORE */
|
||||
|
||||
#ifndef SQLITE_CORE
|
||||
/* This case when the file really is being compiled as a loadable
|
||||
** extension */
|
||||
# define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api=0;
|
||||
# define SQLITE_EXTENSION_INIT2(v) sqlite3_api=v;
|
||||
# define SQLITE_EXTENSION_INIT3 \
|
||||
extern const sqlite3_api_routines *sqlite3_api;
|
||||
#else
|
||||
/* This case when the file is being statically linked into the
|
||||
** application */
|
||||
# define SQLITE_EXTENSION_INIT1 /*no-op*/
|
||||
# define SQLITE_EXTENSION_INIT2(v) (void)v; /* unused parameter */
|
||||
# define SQLITE_EXTENSION_INIT3 /*no-op*/
|
||||
#endif
|
||||
|
||||
#endif /* _SQLITE3EXT_H_ */
|
@ -0,0 +1,25 @@
|
||||
#系统配置参数
|
||||
[SYSCFG]
|
||||
#光口IP地址
|
||||
ip1=192.168.1.199
|
||||
|
||||
#电口子网掩码
|
||||
netmask1=255.255.255.0
|
||||
|
||||
#电口网关
|
||||
gateway1=192.168.1.1
|
||||
|
||||
#光口IP地址
|
||||
ip2=192.169.1.199
|
||||
|
||||
#光口子网掩码
|
||||
netmask2=255.255.255.0
|
||||
|
||||
#光口网关
|
||||
gateway2=192.169.1.1
|
||||
|
||||
#SNTP服务器地址
|
||||
sntp_server=192.168.1.11
|
||||
|
||||
#ied名称
|
||||
ied_name=TIED10
|
@ -0,0 +1,250 @@
|
||||
#include "goahead.h"
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
//#include <sys/types.h>
|
||||
//#include <sys/stat.h>
|
||||
//#include <sys/ioctl.h>
|
||||
#include <time.h>
|
||||
//#include <linux/rtc.h>
|
||||
//#include <linux/capability.h>
|
||||
#include "sysinfo.h"
|
||||
|
||||
static const char *rtcname;
|
||||
|
||||
int web_get_sys_para(int eid, Webs *wp, int argc, char **argv)
|
||||
{
|
||||
char *sec_name,*key_name;
|
||||
char var[128];
|
||||
if(jsArgs(argc,argv,"%s %s",&sec_name,&key_name)<2)
|
||||
{
|
||||
websError(wp,400,"Insufficient args\n");
|
||||
return -1;
|
||||
}
|
||||
ini_gets(sec_name,key_name," ",var,sizeof(var),sys_cfg_file);
|
||||
return (int) websWrite(wp,"\"%s\"",var);
|
||||
}
|
||||
|
||||
void sys_reboot(Webs *wp)
|
||||
{
|
||||
system("reboot");//系统设置
|
||||
}
|
||||
|
||||
void ethx_process(Webs *wp)
|
||||
{
|
||||
/*第11行开始
|
||||
auto eth0
|
||||
iface eth0 inet static
|
||||
address 192.168.1.199
|
||||
netmask 255.255.255.0
|
||||
network 192.168.1.0
|
||||
gateway 192.168.1.1
|
||||
*/
|
||||
char *str1,*str2,*str3;
|
||||
char ipaddr[32];
|
||||
char netmask[32];
|
||||
char gateway[32];
|
||||
char cmd[128];
|
||||
|
||||
ini_gets("SYSCFG","ip1","192.168.1.199",ipaddr,sizeof(ipaddr),sys_cfg_file);
|
||||
ini_gets("SYSCFG","netmask1","255.255.255.0",netmask,sizeof(netmask),sys_cfg_file);
|
||||
ini_gets("SYSCFG","gateway1","192.168.1.1",gateway,sizeof(gateway),sys_cfg_file);
|
||||
str1=websGetVar(wp,"ip1",ipaddr);
|
||||
if(str1!=NULL)
|
||||
{
|
||||
if((str2=websGetVar(wp,"netmask1",netmask))!=NULL)
|
||||
if((str3=websGetVar(wp,"gateway1",gateway))!=NULL)
|
||||
{
|
||||
//printf("%s %s %s \n",ipaddr,netmask,gateway);
|
||||
sprintf(cmd,"sed -i '13c address %s' /etc/network/interfaces",str1);
|
||||
system(cmd);
|
||||
sprintf(cmd,"sed -i '14c netmask %s' /etc/network/interfaces",str2);
|
||||
system(cmd);
|
||||
sprintf(cmd,"sed -i '16c gateway %s' /etc/network/interfaces",str3);
|
||||
system(cmd);
|
||||
ini_puts("SYSCFG","ip1",str1,sys_cfg_file);
|
||||
ini_puts("SYSCFG","netmask1",str2,sys_cfg_file);
|
||||
ini_puts("SYSCFG","gateway1",str3,sys_cfg_file);
|
||||
}
|
||||
}
|
||||
ini_gets("SYSCFG","ip2","192.169.1.199",ipaddr,sizeof(ipaddr),sys_cfg_file);
|
||||
ini_gets("SYSCFG","netmask2","255.255.255.0",netmask,sizeof(netmask),sys_cfg_file);
|
||||
ini_gets("SYSCFG","gateway2","192.169.1.1",gateway,sizeof(gateway),sys_cfg_file);
|
||||
str1=websGetVar(wp,"ip2",ipaddr);
|
||||
if(str1!=NULL)
|
||||
{
|
||||
if((str2=websGetVar(wp,"netmask2",netmask))!=NULL)
|
||||
if((str3=websGetVar(wp,"gateway2",gateway))!=NULL)
|
||||
{
|
||||
sprintf(cmd,"sed -i '20c address %s' /etc/network/interfaces",str1);
|
||||
system(cmd);
|
||||
sprintf(cmd,"sed -i '21c netmask %s' /etc/network/interfaces",str2);
|
||||
system(cmd);
|
||||
sprintf(cmd,"sed -i '23c gateway %s' /etc/network/interfaces",str3);
|
||||
system(cmd);
|
||||
ini_puts("SYSCFG","ip2",str1,sys_cfg_file);
|
||||
ini_puts("SYSCFG","netmask2",str2,sys_cfg_file);
|
||||
ini_puts("SYSCFG","gateway2",str3,sys_cfg_file);
|
||||
}
|
||||
}
|
||||
websRedirect(wp,"/system.jst");
|
||||
}
|
||||
|
||||
int save_sntp_server(char *server)
|
||||
{
|
||||
char cmd[128];
|
||||
sprintf(cmd,"sed -i '8c SNTP_SERVER=\"%s\"' /usr/sbin/ntpdate",server);
|
||||
system(cmd);
|
||||
ini_puts("SYSCFG","sntp_server",server,sys_cfg_file);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void sntp_process(Webs *wp)
|
||||
{
|
||||
char *str;
|
||||
char sntp_server[65];
|
||||
ini_gets("SYSCFG","sntp_server","192.168.1.11",sntp_server,sizeof(sntp_server),sys_cfg_file);
|
||||
str=websGetVar(wp,"sntp_server",sntp_server);
|
||||
if(str!=NULL)
|
||||
{
|
||||
save_sntp_server(str);
|
||||
}
|
||||
websRedirect(wp,"/system.jst");
|
||||
}
|
||||
|
||||
|
||||
//设置系统时钟
|
||||
int SetSysDateAndTime(struct tm *time_tm)
|
||||
{
|
||||
struct timeval time_tv;
|
||||
time_t timep;
|
||||
int ret;
|
||||
//time_tm->tm_year -= 1900;
|
||||
//time_tm->tm_mon -= 1;
|
||||
time_tm->tm_wday = 0;
|
||||
time_tm->tm_yday = 0;
|
||||
time_tm->tm_isdst = 0;
|
||||
|
||||
timep = mktime(time_tm);
|
||||
time_tv.tv_sec = timep;
|
||||
time_tv.tv_usec = 0;
|
||||
|
||||
ret = settimeofday(&time_tv, NULL);
|
||||
if(ret!=0)
|
||||
{
|
||||
fprintf(stderr,"settimeofday failed\n");
|
||||
return -2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
static int rtc_xopen(const char **default_rtc,int flags)
|
||||
{
|
||||
int rtc;
|
||||
|
||||
if(!*default_rtc) {
|
||||
*default_rtc = "/dev/rtc";
|
||||
rtc = open(*default_rtc, flags);
|
||||
if (rtc >= 0)
|
||||
return rtc;
|
||||
*default_rtc = "/dev/rtc0";
|
||||
rtc = open(*default_rtc, flags);
|
||||
if (rtc >= 0)
|
||||
return rtc;
|
||||
*default_rtc = "/dev/misc/rtc";
|
||||
}
|
||||
|
||||
return open(*default_rtc,flags);
|
||||
}
|
||||
|
||||
//utc=0本地时间,否则格林威治时间
|
||||
static void write_rtc(time_t t,int utc)
|
||||
{
|
||||
#define RTC_SET_TIME _IOW('p',0x0a,struct rtc_time)
|
||||
struct tm *timetm;
|
||||
int rtc = rtc_xopen(&rtcname,O_WRONLY);
|
||||
|
||||
timetm = (struct tm *)(utc?gmtime(&t):localtime(&t));
|
||||
timetm->tm_isdst = 0;
|
||||
|
||||
ioctl(rtc,RTC_SET_TIME,timetm);
|
||||
|
||||
close(rtc);
|
||||
} */
|
||||
|
||||
//utc>0格林威治时间,否则本地时间
|
||||
//系统时间同步到硬件时钟
|
||||
void SetHWClockFromSysClock(int utc)
|
||||
{
|
||||
//struct timeval tv;
|
||||
//gettimeofday(&tv,NULL);
|
||||
//write_rtc(tv.tv_sec,utc);
|
||||
system("hwclock -w");
|
||||
}
|
||||
|
||||
void rtc_process(Webs *wp)
|
||||
{
|
||||
char *str;
|
||||
time_t now;
|
||||
unsigned int i;
|
||||
struct tm uptime;
|
||||
str=websGetVar(wp,"year","2015");
|
||||
if(str!=NULL)
|
||||
{
|
||||
i=atoi(str);
|
||||
uptime.tm_year=i-1900;
|
||||
}
|
||||
str=websGetVar(wp,"month","9");
|
||||
if(str!=NULL)
|
||||
{
|
||||
i=atoi(str);
|
||||
uptime.tm_mon=i-1;
|
||||
}
|
||||
str=websGetVar(wp,"day","1");
|
||||
if(str!=NULL)
|
||||
{
|
||||
i=atoi(str);
|
||||
uptime.tm_mday=i;
|
||||
}
|
||||
str=websGetVar(wp,"hour","0");
|
||||
if(str!=NULL)
|
||||
{
|
||||
i=atoi(str);
|
||||
uptime.tm_hour=i;
|
||||
}
|
||||
str=websGetVar(wp,"minute","0");
|
||||
if(str!=NULL)
|
||||
{
|
||||
i=atoi(str);
|
||||
uptime.tm_min=i;
|
||||
}
|
||||
str=websGetVar(wp,"second","0");
|
||||
if(str!=NULL)
|
||||
{
|
||||
i=atoi(str);
|
||||
uptime.tm_sec=i;
|
||||
}
|
||||
SetSysDateAndTime(&uptime);
|
||||
SetHWClockFromSysClock(1);//表示格林威治时间
|
||||
//now=mktime(&uptime);
|
||||
websRedirect(wp,"/system.jst");
|
||||
}
|
||||
|
||||
void ied_rename_process(Webs *wp)
|
||||
{
|
||||
char *str;
|
||||
char old_name[65];
|
||||
char cmd[128];
|
||||
ini_gets("SYSCFG","ied_name","TIED01",old_name,sizeof(old_name),sys_cfg_file);
|
||||
str=websGetVar(wp,"ied_name",old_name);
|
||||
if(str!=NULL)
|
||||
{
|
||||
if(strlen(str)>2)
|
||||
{
|
||||
sprintf(cmd,". /mk_ied.sh %s",str);
|
||||
ini_puts("SYSCFG","ied_name",str,sys_cfg_file);
|
||||
system(cmd);//执行命令
|
||||
}
|
||||
}
|
||||
websRedirect(wp,"/iedrename.jst");
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
#ifndef _SYSINFO_H
|
||||
#define _SYSINFO_H
|
||||
|
||||
#define sys_cfg_file "/usr_app/syscfg.ini"
|
||||
|
||||
int web_get_sys_para(int eid, Webs *wp, int argc, char **argv);
|
||||
|
||||
|
||||
void sys_reboot(Webs *wp);
|
||||
|
||||
|
||||
void ethx_process(Webs *wp);
|
||||
|
||||
|
||||
int save_sntp_server(char *server);
|
||||
|
||||
|
||||
void sntp_process(Webs *wp);
|
||||
|
||||
|
||||
void rtc_process(Webs *wp);
|
||||
|
||||
|
||||
void ied_rename_process(Webs *wp);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* thread.c
|
||||
*
|
||||
* Created on: Mar 9, 2012
|
||||
* Author: tsx
|
||||
*/
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
pthread_t task_create(void *(*start_routine)(void *),void *arg,int prio,int stacksize)
|
||||
{
|
||||
struct sched_param sch;
|
||||
pthread_attr_t attr;
|
||||
pthread_t pt;
|
||||
int ret;
|
||||
|
||||
if(prio!=0&&stacksize!=0)
|
||||
{
|
||||
pthread_attr_init(&attr);
|
||||
//get attr
|
||||
pthread_attr_getschedparam(&attr,&sch);
|
||||
//set prio
|
||||
sch.sched_priority=prio;
|
||||
pthread_attr_setschedparam(&attr,&sch);
|
||||
//set stack size
|
||||
pthread_attr_setstacksize(&attr,stacksize);
|
||||
//create thread
|
||||
ret=pthread_create(&pt,&attr,start_routine,arg);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret=pthread_create(&pt,NULL,start_routine,arg);
|
||||
}
|
||||
|
||||
if(ret!=0)
|
||||
{
|
||||
printf("create thread failed \r\n");
|
||||
return -1;
|
||||
}
|
||||
return pt;
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
#ifndef _THREAD_H
|
||||
#define _THREAD_H
|
||||
|
||||
extern pthread_t task_create(void *(*start_routine)(void *),void *arg,int prio,int stacksize);
|
||||
|
||||
#endif
|
||||
|
Binary file not shown.
@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
if [ ! $1 ]; then
|
||||
host=192.168.1.11
|
||||
else
|
||||
host=$1
|
||||
fi
|
||||
echo "host is $host"
|
||||
|
||||
echo "update shell files"
|
||||
cd /etc/init.d
|
||||
tftp -g -r rcS $host
|
||||
chmod +x rcS
|
||||
tftp -g -r S71ntpdate $host
|
||||
chmod +x S71ntpdate
|
||||
tftp -g -r S81srvrd $host
|
||||
chmod +x S81srvrd
|
||||
tftp -g -r S90app $host
|
||||
chmod +x S90app
|
||||
|
||||
echo "update usr app"
|
||||
cd /usr_app
|
||||
killall app
|
||||
tftp -g -r app $host
|
||||
chmod +x app
|
||||
tftp -g -r ysp_cfg.ini $host
|
||||
tftp -g -r syscfg.ini $host
|
||||
echo "update iec file"
|
||||
cd /scl_srvr
|
||||
tftp -g -r scl_srvr.tar.gz $host
|
||||
tar -xvf scl_srvr.tar.gz
|
||||
echo "update html file"
|
||||
cd /var/www/web
|
||||
tftp -g -r web.tar.gz $host
|
||||
tar -xvf web.tar.gz
|
||||
|
||||
cd /
|
||||
tftp -g -r mk_ied.sh $host
|
||||
chmod +x mk_ied.sh
|
||||
|
||||
echo "update all files ok"
|
||||
echo "now reboot system"
|
||||
#reboot
|
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,79 @@
|
||||
#include <pthread.h>
|
||||
#include "ysp_debug.h"
|
||||
#include "database.h"
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include "common.h"
|
||||
|
||||
|
||||
unsigned int debug_flags=/*PARA_TRACE_DEBUG|*/TRACE_DEBUG|ANALYSIS_TRACE_DEBUG|ANALYSIS_EEROR_DEBUG|ERROR_DEBUG|ACTION_DEBUG|COMUNICATION_TRACE_DEBUG|COMUNICATION_EEROR_DEBUG;
|
||||
|
||||
static pthread_mutex_t mutex_log;
|
||||
static int mutex_log_inited=0;
|
||||
|
||||
static char my_log_buf[1024];
|
||||
|
||||
void my_log_init(void)
|
||||
{
|
||||
if(!mutex_log_inited)
|
||||
{
|
||||
if(pthread_mutex_init(&mutex_log,NULL)!=0)
|
||||
{
|
||||
printf("init log mutex failed\r\n");
|
||||
return;
|
||||
}
|
||||
all_table_init();
|
||||
mutex_log_inited++;
|
||||
}
|
||||
}
|
||||
|
||||
void lock_log(void)
|
||||
{
|
||||
if(!mutex_log_inited)
|
||||
my_log_init();
|
||||
pthread_mutex_lock(&mutex_log);
|
||||
}
|
||||
|
||||
void unlock_log(void)
|
||||
{
|
||||
pthread_mutex_unlock(&mutex_log);
|
||||
}
|
||||
|
||||
|
||||
void do_my_log(const char *fmt,...)/*__attribute__((format(printf,2,3)))*/
|
||||
{
|
||||
int len;
|
||||
va_list args;
|
||||
lock_log();
|
||||
va_start(args, fmt );
|
||||
len=vsprintf(my_log_buf,fmt,args);
|
||||
va_end(args);
|
||||
log_entry_add(my_log_buf,len);
|
||||
unlock_log();
|
||||
}
|
||||
|
||||
void remove_old_log(unsigned int rsv_time)
|
||||
{
|
||||
lock_log();
|
||||
data_entry_remove("log_tbl",(time_t)rsv_time);
|
||||
unlock_log();
|
||||
}
|
||||
|
||||
int add_his_entry(ANALY_RESULT *str)
|
||||
{
|
||||
int ret;
|
||||
lock_log();
|
||||
ret=his_entry_add(str);
|
||||
unlock_log();
|
||||
return ret;
|
||||
}
|
||||
|
||||
int read_his_entry(ANALY_RESULT *str)
|
||||
{
|
||||
int ret;
|
||||
lock_log();
|
||||
ret=his_entry_read(str);
|
||||
unlock_log();
|
||||
return ret;
|
||||
}
|
||||
|
@ -0,0 +1,6 @@
|
||||
H2 289 332 399
|
||||
CO 400 434 470
|
||||
CH4 590 630 696
|
||||
C2H4 2130 2240 2440
|
||||
C2H6 2727 2854 3097
|
||||
C2H2 3306 3450 3680
|
Loading…
Reference in New Issue