FieldServer FS-8700-86 Manuale Utente

Pagina di 32
FS-8700-86 Carrier DataPort 
 
 
 
 
 
 
Page 19 of 32 
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA   Web: www.fieldserver.com 
Tel: (408) 262 2299   Fax: (408) 262 2269   Toll Free: (888) 509 1970   email: support@fieldserver.com 
Appendix A.3. 
Map Descriptor Length Explained 
The Length parameter is specified as part of the Map Descriptor. 
 
Client Reads: 
The length means: “The number of table variable’s whose values are to be stored when the response 
is received.” If you do not know the length of the table in advance, set the length to a larger number 
(e.g.  100).  The  driver  will  process  the  response;  if  the  table  contains  more  than  100  elements  then 
some data will be discarded.  
 
Server: 
The length parameter is used when the server returns a value that is a string. The length is used to 
tell  the  driver  how  many  characters  to  extract  from  consecutive  array  location  to  form  the  response 
string. When the server returns a value that is a number, state or time the length should always be 1.  
 
Appendix A.4. 
How the Client stores the states/values of the Table Variables. 
Appendix A.4.1. 
Discrete States 
When a Carrier DataPort device reports the state of a table variable which has a discrete state, it 
reports the state as a keyword like on/off. This driver converts the keywords to facilitate reading 
by other devices. 
 
The driver  is programmed to recognize the keywords  listed below.  The user can add keywords 
by specifying additional information in the configuration file. 
 
State Word 
Value 
State Word 
Value 
State Word 
Value 
CLEAN 
ABNORMAL 
OPEN 
DIRTY 
NORMAL 
CLOSE 
HEAT 
LOCAL 
CLOSED 
COOL 
REMOTE 
ALARM 
ON 
LOCAL R 
 
 
OFF 
RUNNING 
 
 
 
If the driver doesn’t recognize the state word, it stores the characters of the state word as decimal 
values  based  on  their  ASCII  value.  the  number  of characters  stored  is  dependent  on  the  length 
parameter. 
 
For  example,  say  the  driver  responds,  reporting  a  variable  to  be  a  state  ‘INCREDIBLE’.  If  the 
length parameter of the polling Map Descriptor is 1 then the driver stores the first character of the 
word  incredible;  by  storing  a  value  of  73  (An  uppercase  ‘I’  is  the  seventy  third  character  in  the 
ASCII alphabet.).  
 
The driver recognizes discrete state words by checking the 1
st
 character of the value field. If it is a 
non-digit then it is regarded as a state word. The comparison against keywords in the list is done 
without respect for the case of the letters. 
 
Unrecognized Discrete State Words 
If  the  driver  does  not  recognize  the  discrete  state  word  that  has  been  used  it  will  report  the 
following error - CarrDP:#24 Err. MD=<MapDesc1> discrete state word not recognized. 
 
The unrecognized discrete word can be found by extracting 10 characters from the line starting at 
the 10th character.  Once the 10 characters have been extracted they are left and right trimmed 
to remove leading and trailing spaces.