Map27
 All Classes Functions Variables Enumerations Enumerator Pages
Map27.h
1 // Map27.h
2 //
3 // Basic definitions for Map27 library
4 //
5 // Author: Mike McCauley (mikem@airspayce.com)
6 // Copyright (C) 2013 Mike McCauley
7 // $Id: DataLayer.h,v 1.1 2013/07/09 23:38:09 mikem Exp mikem $
8 
100 //
113 
114 #ifndef MAP27_MAP27_H
115 #define MAP27_MAP27_H
116 
117 // The version of the Map27 protocol we can handle
118 // Corresponds to "MAP27 Mobile Access Protocol for MPT 1327 equipment Version 1.5" January 1998
119 #define MAP27_PROTOCOL_VERSION 1
120 
121 // Default Baud rate
122 #define MAP27_DEFAULT_BAUD 9600
123 
124 // N1 4.5.6
125 // Max message legth this uint can handle
126 // Actual length is negotiated at link establishment time
127 #define MAP27_N1 10
128 #define MAP27_MAX_MESSAGE_LEN (16*(MAP27_N1+1))
129 
130 // k 4.3.2.1
131 // Max number of pending messages this unit can handle
132 // MAx window size k
133 #define MAP27_WINDOW_SIZE 5
134 
135 // N2 4.5.7
136 #define MAP27_MAX_RETRANSMISSIONS 10
137 
138 // N3 4.5.8
139 #define MAP27_MAX_ACTIVITY_TIMEOUTS 5
140 
141 // T0 4.5.1
142 #define MAP27_ESTABLISHMENT_TIMEOUT 100
143 // T1 is computed by calc_retry_timeout()
144 // T2 is computed by calc_acknowledgement_timeout()
145 // T3 4.5.4:
146 #define MAP27_ACTIVITY_TIMEOUT 15000
147 // T4 4.5.5
148 #define MAP27_LINK_FAILURE_DETECTION_TIMEOUT ((MAP27_MAX_ACTIVITY_TIMEOUTS * MAP27_ACTIVITY_TIMEOUT) + 10)
149 
150 #define min(a,b) ((a)<(b)?(a):(b))
151 #define max(a,b) ((a)>(b)?(a):(b))
152 
153 
154 #endif