4 # Various protocol constant values for 3M's Standard Interchange
5 # Protocol for communication between a library's Automated
6 # Checkout System (ACS) and stand-alone Self-Check (SC) units
8 package Sip
::Constants
;
14 our (@ISA, @EXPORT_OK, %EXPORT_TAGS);
23 SC_STATUS REQUEST_ACS_RESEND
24 LOGIN PATRON_INFO END_PATRON_SESSION
25 FEE_PAID ITEM_INFORMATION ITEM_STATUS_UPDATE
33 CHECKOUT_RESP CHECKIN_RESP
34 ACS_STATUS REQUEST_SC_RESEND
35 LOGIN_RESP PATRON_INFO_RESP END_SESSION_RESP
36 FEE_PAID_RESP ITEM_INFO_RESP ITEM_STATUS_UPDATE_RESP
37 HOLD_RESP RENEW_RESP RENEW_ALL_RESP
41 SC_status
=> [qw(SC_STATUS_OK SC_STATUS_PAPER SC_STATUS_SHUTDOWN)],
42 formats
=> [qw(SIP_DATETIME)],
43 constant_msgs
=> [qw(REQUEST_ACS_RESEND_CKSUM REQUEST_SC_RESEND_CKSUM)],
46 FID_PATRON_ID FID_ITEM_ID
47 FID_TERMINAL_PWD FID_PATRON_PWD
48 FID_PERSONAL_NAME FID_DUE_DATE
49 FID_SCREEN_MSG FID_PRINT_LINE
50 FID_TITLE_ID FID_BLOCKED_CARD_MSG
51 FID_TERMINAL_LOCN FID_INST_ID
52 FID_CURRENT_LOCN FID_LIBRARY_NAME
54 FID_HOLD_ITEMS FID_HOLD_ITEMS_LMT
55 FID_OVERDUE_ITEMS FID_OVERDUE_ITEMS_LMT
56 FID_CHARGED_ITEMS FID_CHARGED_ITEMS_LMT
57 FID_FINE_ITEMS FID_SEQNO
58 FID_CKSUM FID_HOME_ADDR
59 FID_EMAIL FID_HOME_PHONE
60 FID_OWNER FID_CURRENCY
62 FID_TRANSACTION_ID FID_VALID_PATRON
66 FID_START_ITEM FID_END_ITEM FID_QUEUE_POS
67 FID_PICKUP_LOCN FID_FEE_TYPE
69 FID_FEE_AMT FID_FEE_LMT
73 FID_UNAVAILABLE_HOLD_ITEMS
75 FID_FEE_ID FID_ITEM_PROPS
76 FID_RECALL_DATE FID_SECURITY_INHIBIT
77 FID_MEDIA_TYPE FID_SORT_BIN
79 FID_LOGIN_UID FID_LOGIN_PWD
88 FID_DESTINATION_LOCATION
95 # Add the contents of the other ":class" tags to make an ":all" class (deleting duplicates)
96 # This is the textbook example from http://perldoc.perl.org/Exporter.html
98 push @
{$EXPORT_TAGS{all
}}, grep {!$seen{$_}++} @
{$EXPORT_TAGS{$_}} foreach keys %EXPORT_TAGS;
99 Exporter
::export_ok_tags
('all'); # now add :all to @EXPORT_OK
103 # Declare message types
106 # Messages from SC to ACS
108 PATRON_STATUS_REQ
=> '23',
111 BLOCK_PATRON
=> '01',
113 REQUEST_ACS_RESEND
=> '97',
116 END_PATRON_SESSION
=> '35',
118 ITEM_INFORMATION
=> '17',
119 ITEM_STATUS_UPDATE
=> '19',
120 PATRON_ENABLE
=> '25',
126 # Message responses from ACS to SC
128 PATRON_STATUS_RESP
=> '24',
129 CHECKOUT_RESP
=> '12',
130 CHECKIN_RESP
=> '10',
132 REQUEST_SC_RESEND
=> '96',
134 PATRON_INFO_RESP
=> '64',
135 END_SESSION_RESP
=> '36',
136 FEE_PAID_RESP
=> '38',
137 ITEM_INFO_RESP
=> '18',
138 ITEM_STATUS_UPDATE_RESP
=> '20',
139 PATRON_ENABLE_RESP
=> '26',
142 RENEW_ALL_RESP
=> '66',
146 # Some messages are short and invariant, so they're constant's too
149 REQUEST_ACS_RESEND_CKSUM
=> '97AZFEF5',
150 REQUEST_SC_RESEND_CKSUM
=> '96AZFEF6',
157 FID_PATRON_ID
=> 'AA',
159 FID_TERMINAL_PWD
=> 'AC',
160 FID_PATRON_PWD
=> 'AD',
161 FID_PERSONAL_NAME
=> 'AE',
162 FID_SCREEN_MSG
=> 'AF',
163 FID_PRINT_LINE
=> 'AG',
164 FID_DUE_DATE
=> 'AH',
166 FID_TITLE_ID
=> 'AJ',
168 FID_BLOCKED_CARD_MSG
=> 'AL',
169 FID_LIBRARY_NAME
=> 'AM',
170 FID_TERMINAL_LOCN
=> 'AN',
172 FID_CURRENT_LOCN
=> 'AP',
173 FID_PERM_LOCN
=> 'AQ',
175 FID_HOLD_ITEMS
=> 'AS', # SIP 2.0
176 FID_OVERDUE_ITEMS
=> 'AT', # SIP 2.0
177 FID_CHARGED_ITEMS
=> 'AU', # SIP 2.0
178 FID_FINE_ITEMS
=> 'AV', # SIP 2.0
188 FID_HOME_ADDR
=> 'BD',
190 FID_HOME_PHONE
=> 'BF',
192 FID_CURRENCY
=> 'BH',
195 FID_TRANSACTION_ID
=> 'BK',
196 FID_VALID_PATRON
=> 'BL',
197 FID_RENEWED_ITEMS
=> 'BM',
198 FID_UNRENEWED_ITEMS
=> 'BN',
200 FID_START_ITEM
=> 'BP',
201 FID_END_ITEM
=> 'BQ',
202 FID_QUEUE_POS
=> 'BR',
203 FID_PICKUP_LOCN
=> 'BS',
204 FID_FEE_TYPE
=> 'BT',
205 FID_RECALL_ITEMS
=> 'BU',
207 FID_EXPIRATION
=> 'BW',
208 FID_SUPPORTED_MSGS
=> 'BX',
209 FID_HOLD_TYPE
=> 'BY',
210 FID_HOLD_ITEMS_LMT
=> 'BZ',
211 FID_OVERDUE_ITEMS_LMT
=> 'CA',
212 FID_CHARGED_ITEMS_LMT
=> 'CB',
214 FID_UNAVAILABLE_HOLD_ITEMS
=> 'CD',
216 FID_HOLD_QUEUE_LEN
=> 'CF',
218 FID_ITEM_PROPS
=> 'CH',
219 FID_SECURITY_INHIBIT
=> 'CI',
220 FID_RECALL_DATE
=> 'CJ',
221 FID_MEDIA_TYPE
=> 'CK',
222 FID_SORT_BIN
=> 'CL',
223 FID_HOLD_PICKUP_DATE
=> 'CM',
224 FID_LOGIN_UID
=> 'CN',
225 FID_LOGIN_PWD
=> 'CO',
226 FID_LOCATION_CODE
=> 'CP',
227 FID_VALID_PATRON_PWD
=> 'CQ',
229 # SIP Extensions used by Envisionware Terminals
230 FID_PATRON_BIRTHDATE
=> 'PB',
231 FID_PATRON_CLASS
=> 'PC',
233 # SIP Extension for reporting patron internet privileges... application unknown
234 FID_INET_PROFILE
=> 'PI',
236 # SIP Extensions by 3M spec: Document Revision 1.20, 02/14/2005
237 FID_COLLECTION_CODE
=> 'CR',
238 FID_CALL_NUMBER
=> 'CS',
239 FID_DESTINATION_LOCATION
=> 'CT',
240 FID_ALERT_TYPE
=> 'CV',
241 FID_HOLD_PATRON_ID
=> 'CY',
242 FID_HOLD_PATRON_NAME
=> 'DA',
250 SC_STATUS_PAPER
=> '1',
251 SC_STATUS_SHUTDOWN
=> '2',
255 # Various format strings
258 SIP_DATETIME
=> "%Y%m%d %H%M%S",