Completed
Push — master ( 669803...3326da )
by Yannick
31:15
created
require/class.AIS.php 1 patch
Doc Comments   +25 added lines patch added patch discarded remove patch
@@ -68,6 +68,10 @@  discard block
 block discarded – undo
68 68
        't', 'u', 'v', 'w' // 119
69 69
     ); // char 64
70 70
     */
71
+
72
+	/**
73
+	 * @param integer $ascii
74
+	 */
71 75
 	private function asciidec_2_8bit($ascii) {
72 76
 		//only process in the following range: 48-87, 96-119
73 77
 		if ($ascii < 48) { }
@@ -93,6 +97,10 @@  discard block
 block discarded – undo
93 97
 		return(substr($bin, -6)); 
94 98
 	}
95 99
 
100
+	/**
101
+	 * @param integer $_start
102
+	 * @param integer $_size
103
+	 */
96 104
 	private function binchar($_str, $_start, $_size) {
97 105
 		//  ' ' --- '?', // 0x20 - 0x3F
98 106
 		//  '@' --- '_', // 0x40 - 0x5F
@@ -118,6 +126,10 @@  discard block
 block discarded – undo
118 126
 	}
119 127
 
120 128
 	// function for decoding the AIS Message ITU Payload
129
+
130
+	/**
131
+	 * @param string $_aisdata
132
+	 */
121 133
 	private function decode_ais($_aisdata) {
122 134
 		$ro = new stdClass(); // return object
123 135
 		$ro->cls = 0; // AIS class undefined, also indicate unparsed msg
@@ -350,6 +362,12 @@  discard block
 block discarded – undo
350 362
 		elseif ($code == 99) return 'Other Type, no additional information';
351 363
 	}
352 364
 
365
+	/**
366
+	 * @param string $_itu
367
+	 * @param integer $_len
368
+	 * @param integer $_filler
369
+	 * @param string $aux
370
+	 */
353 371
 	public function process_ais_itu($_itu, $_len, $_filler, $aux /*, $ais_ch*/) {
354 372
 		global $port; // tcpip port...
355 373
 		static $debug_counter = 0;
@@ -369,6 +387,10 @@  discard block
 block discarded – undo
369 387
 
370 388
 	// char* - AIS \r terminated string
371 389
 	// TCP based streams which send messages in full can use this instead of calling process_ais_buf
390
+
391
+	/**
392
+	 * @param string $rawdata
393
+	 */
372 394
 	public function process_ais_raw($rawdata, $aux = '') { // return int
373 395
 		static $num_seq; // 1 to 9
374 396
 		static $seq; // 1 to 9
@@ -591,6 +613,9 @@  discard block
 block discarded – undo
591 613
 		return $result;
592 614
 	}
593 615
 
616
+	/**
617
+	 * @param string $mmsi
618
+	 */
594 619
 	public function mmsitype($mmsi) {
595 620
 		if (strlen($mmsi) == 9) {
596 621
 			if (substr($mmsi,0,3) == '974') return 'EPIRB (Emergency Position Indicating Radio Beacon) AIS';
Please login to merge, or discard this patch.