Completed
Push — master ( dab432...128a26 )
by Yannick
35:16 queued 01:17
created
require/class.AIS.php 1 patch
Doc Comments   +25 added lines patch added patch discarded remove patch
@@ -156,6 +156,10 @@  discard block
 block discarded – undo
156 156
        't', 'u', 'v', 'w' // 119
157 157
     ); // char 64
158 158
     */
159
+
160
+	/**
161
+	 * @param integer $ascii
162
+	 */
159 163
 	private function asciidec_2_8bit($ascii) {
160 164
 		//only process in the following range: 48-87, 96-119
161 165
 		if ($ascii < 48) { }
@@ -181,6 +185,10 @@  discard block
 block discarded – undo
181 185
 		return(substr($bin, -6)); 
182 186
 	}
183 187
 
188
+	/**
189
+	 * @param integer $_start
190
+	 * @param integer $_size
191
+	 */
184 192
 	private function binchar($_str, $_start, $_size) {
185 193
 		//  ' ' --- '?', // 0x20 - 0x3F
186 194
 		//  '@' --- '_', // 0x40 - 0x5F
@@ -206,6 +214,10 @@  discard block
 block discarded – undo
206 214
 	}
207 215
 
208 216
 	// function for decoding the AIS Message ITU Payload
217
+
218
+	/**
219
+	 * @param string $_aisdata
220
+	 */
209 221
 	private function decode_ais($_aisdata) {
210 222
 		$ro = new stdClass(); // return object
211 223
 		$ro->cls = 0; // AIS class undefined, also indicate unparsed msg
@@ -364,6 +376,12 @@  discard block
 block discarded – undo
364 376
 		else return '';
365 377
 	}
366 378
 
379
+	/**
380
+	 * @param string $_itu
381
+	 * @param integer $_len
382
+	 * @param integer $_filler
383
+	 * @param string $aux
384
+	 */
367 385
 	public function process_ais_itu($_itu, $_len, $_filler, $aux /*, $ais_ch*/) {
368 386
 		global $port; // tcpip port...
369 387
 		static $debug_counter = 0;
@@ -383,6 +401,10 @@  discard block
 block discarded – undo
383 401
 
384 402
 	// char* - AIS \r terminated string
385 403
 	// TCP based streams which send messages in full can use this instead of calling process_ais_buf
404
+
405
+	/**
406
+	 * @param string $rawdata
407
+	 */
386 408
 	public function process_ais_raw($rawdata, $aux = '') { // return int
387 409
 		static $num_seq; // 1 to 9
388 410
 		static $seq; // 1 to 9
@@ -607,6 +629,9 @@  discard block
 block discarded – undo
607 629
 		return $result;
608 630
 	}
609 631
 
632
+	/**
633
+	 * @param string $mmsi
634
+	 */
610 635
 	public function mmsitype($mmsi) {
611 636
 		if (strlen($mmsi) == 9) {
612 637
 			if (substr($mmsi,0,3) == '974') return 'EPIRB (Emergency Position Indicating Radio Beacon) AIS';
Please login to merge, or discard this patch.