+
+ public function testParseCallRefType()
+ {
+ $msg = $this->parseMsg('00 97 16 4C 08 01 81 45 08 02 80 90 FF 0A');
+ self::assertEquals(1, $msg->callRef, 'Call reference is wrong');
+ self::assertEquals(1, $msg->callRefType, 'Call reference type is wrong');
+
+ $msg = $this->parseMsg('00 97 16 4C 08 01 85 45 08 02 80 90 FF 0A');
+ self::assertEquals(5, $msg->callRef, 'Call reference is wrong');
+ self::assertEquals(1, $msg->callRefType, 'Call reference type is wrong');
+
+ $msg = $this->parseMsg('00 97 16 4C 08 01 05 45 08 02 80 90 FF 0A');
+ self::assertEquals(5, $msg->callRef, 'Call reference is wrong');
+ self::assertEquals(0, $msg->callRefType, 'Call reference type is wrong');
+ }
+
+ public function testParseCallRefLong()
+ {
+ $msg = $this->parseMsg('00 97 16 4C 08 02 05 06 45 08 02 80 90 FF 0A');
+ self::assertEquals(0x0506, $msg->callRef, 'Call reference is wrong');
+ self::assertEquals(0, $msg->callRefType, 'Call reference type is wrong');
+
+ $msg = $this->parseMsg('00 97 16 4C 08 02 85 06 45 08 02 80 90 FF 0A');
+ self::assertEquals(0x0506, $msg->callRef, 'Call reference is wrong');
+ self::assertEquals(1, $msg->callRefType, 'Call reference type is wrong');
+
+ $msg = $this->parseMsg('00 97 16 4C 08 03 85 06 07 45 08 02 80 90 FF 0A');
+ self::assertEquals(0x050607, $msg->callRef, 'Call reference is wrong');
+ self::assertEquals(1, $msg->callRefType, 'Call reference type is wrong');
+ }