1、 KSKSKSKSKSKSKSK KSKSKS KSKSK KSKS KSK KS KS X 4505 1 1: KS X 4505 1:2012 2012 12 28 http:/www.kats.go.krKS X 4505 1:2012 : ( ) ( ) () () ( ) : / ( ) SNS ( ) ( ) : (http:/www.standard.go.kr) : :2012 12 28 2012-0830 : : / ( 02-509-7262) (http:/www.kats.go.kr). 10 5 , . KS X 4505 1:2012 i ii 1 1 2 1 3
2、 .1 4 3 4.1 3 5 5 5.1 Operation Code 7 5.2 Device Type8 6 Result Code .9 7 Operation Code Payload Message .10 7.1 DEVICE_DISCOVERY_REQUEST11 7.2 DEVICE_DISCOVERY_RESPONSE.12 7.3 DEVICE_ADVERTISEMENT13 7.4 DEVICE_INFO_REQUEST 15 7.5 DEVICE_INFO_RESPONSE17 7.6 DEVICE_CONTROL_REQUEST .39 7.7 DEVICE_CON
3、TROL_RESPONSE.41 7.8 EVENT_NOTIFICATION 42 7.9 EVENT_SUBSCRIPTION_REQUEST .44 7.10 EVENT_SUBSCRIPTION_RESPONSE45 7.11 GET_FILEINFO_REQUEST 45 7.12 GET_FILEINFO_RESPONSE .47 7.13 GET_FILE_REQUEST.49 7.14 GET_FILE_RESPONSE 50 7.15 GET_FILE_RESULT50 7.16 PUT_FILE_REQUEST.51 7.17 PUT_FILE_RESPONSE 52 7.
4、18 PUT_FILE_RESULT 53 7.19 APPLY_REQUEST 53 7.20 APPLY_RESPONSE55 7.21 APPLY_RESULT .55 A( ) Unit Type .57 B( ) Payload Schema .58 KS X 4505 1:2012 .80 KS X 4505 1:2012 ii . . , , . , , . KS X 4505 1:2012 1: The complex server protocol for intelligent home network Part 1: Base protocol 1 / , , , CCT
5、V, , , . 2 . . ( ) . KS A 0001, KS X 4500 1, 1 KS X 4501 1, 1: KS X 4501 2, 2: KS X 4501 3, 3: KS X 4501 4, 4: ISO/IEC 15045 1: 2004, Information technology Home Electronic Systems (HES) gateway TTAS.KO-04.0015, (Home Gateway Standard) TTAS.KO-04.0032, FTTH (The Requirement Standard for FTTH Home Ga
6、teway) TTAK.KO-04.0083, / RS-485 (RS-485 Protocol For Home Network Wallpad/Home Gateway) 3 . 3.1 ( ) KS X 4505 1:2012 2 3.2 , , , 3.3 , , 3.4 3.5 (Ethernet, Serial ) 3.6 / , , 3.7 . , , . 3.8 , , CCTV, , , 3.9 , 3.10 3.11 , , 3.12 , , KS X 4505 1:2012 3 3.13 , 3.14 HNML , XML 3.15 , , , 4 4.1 4.1.1
7、/ , , . / . , . 1 4.1.2 . KS X 4505 1:2012 4 1 OP Code Parameter Size Description Device Discovery Request (0x1111) AdList variable AdList Type ( ) , variable , Data Structure Parameter (Condition) Sub Parameter Size Description Condition AdList Type numofdevice (M) 2 Bytes (uint16_t) x Start x End
8、M (M)/ (O) , , ( ) , (M)/ (O) 4.1.3 3 operation , 2 . DEVICE_ADVERTISEMENT(7.3) . DEVICE_ADVERTISEMENT Payload XML “Start” . DEVICE_ADVERTISEMENT DEVICE_DISCOVERY_REQUEST(7.1) , DEVICE_DISCOVERY_RESPONSE(7.2) . KS X 4505 1:2012 5 2 4.1.4 DEVICE_ADVERTISEMENT(7.3) . DEVICE_ADVERTISEMENT Payload XML “
9、End” . 5 / , , . / . TCP/IP . Message . 3 KS X 4505 1:2012 6 Message Header Payload , Header Binary Stream, Payload Header XML(HNML) . XML Header Header Binary . Header , Source ID, Destination ID, OP code, , OP code . Source ID Destination ID 16Bytes HomeID 14Bytes (4Bytes) (4Bytes) (4Bytes) (2Byte
10、s) ID 2Bytes . Header TransactionID ID, , ID . Header . CRC 4Bytes Length(4Bytes), MessageID(4Bytes), SourceID(4Bytes), DestinationID( 4Bytes), TransactionID(4Bytes) XOR CRC . / , , , / , , KS X 4501 2, 3, 4 . KS X 4501 / , KS X 4501 2, 3, 4 KS X 4501 Message Type 0 (MTYPE_AI_ MESSAGE), Message Sub
11、Type 16 (MTYPE_ADAPT_LOCAL_MIDDLEWARE_ MESSAGE) Header , KS X 4501 2, 3, 4 Payload . 2 Message Header Format (Byte) Version 1 0x01 Flag 1 Urgent flag : 0x01 / : 0x00 PayloadType 1 0x02(XML)EncodingType 1 0x03(UTF-8) Length 4 message (Header ) Message ID 4 Payload XML ID Payload segment Payload XML I
12、D Sequence Number 2 Partial sequence number for specific XML Payload segment segment ID OP Code 2 Operation code (5.1 ) KS X 4505 1:2012 7 2 Message Header Format( ) (Byte) Source ID 16 message ID (4Bytes) (4Bytes) (4Bytes) (2Bytes) ID (2Bytes) Destination ID 16 message ID (4Bytes) (4Bytes) (4Bytes)
13、 (2Bytes) ID (2Bytes) TransactionID 8 Transaction Identifier time_t 8bytes CRC 4 message Length(4Bytes), MessageID(4Bytes), SourceID ( 4Bytes), DestinationID( 4Bytes), TransactionID(4Bytes) XOR Optional Header / DATA 4 OP Code 5.1 Operation Code Message Header Operation Code . OP Code , , , Operatio
14、n Code . 3 Operation Code Transaction OP Name Code Description Device Discovery DEVICE_DISCOVERY_REQUEST DEVICE_DISCOVERY_RESPONSE 0x1111 0x1112 Device Device Advertisement DEVICE_ADVERTISEMENT 0x1121 Plug in/out, Device Device Info DEVICE_INFO_REQUEST DEVICE_INFO_RESPONSE 0x2011 0x2012 Device(Netwo
15、rk) Description Device/Network State Device Control DEVICE_CONTROL_REQUEST DEVICE_CONTROL_RESPONSE 0x2111 0x2112 Device Event EVENT_NOTIFICATION 0x2FF1 Device/Network SENSOR Data Event Subscription EVENT_SUBSCRIPTION_REQUEST EVENT_SUBSCRIPTION_RESPONSE0x2F11 0x2F12 / Get File Info GET_FILEINFO_REQUE
16、ST GET_FILEINFO_RESPONSE 0x2211 0x2212 Get File GET_FILE_REQUEST GET_FILE_RESPONSE GET_FILE_RESULT 0x2221 0x2222 0x2223 (EXE, FIRMWARE, Configuration,) KS X 4505 1:2012 8 3 Operation Code( ) Transaction OP Name Code Description Put File PUT_FILE_REQUEST PUT_FILE_RESPONSE PUT_FILE_RESULT 0x2231 0x223
17、2 0x2233 Apply APPLY_REQUEST APPLY_RESPONSE APPLY_RESULT 0x2311 0x2312 0x2313 Rollback / FILE (EXE, FIRMWARE, Configuration,.) User Defined Transaction USER Defined Operation 0x80000xFFFF transaction 5.2 Device Type Device , Device Type Code 4 . Device Code 2Bytes , 1Byte Device Category, 1Byte Cate
18、gory . 4 Device Type Device Type Home Gateway/ Server Home Information Internet ConsumerAutomation Audio/Video AdaptorShared Unit MiscellaneousCode 11XX 12XX 13XX 14XX 15XX 16XX 17XX 1FXX 01 Home Gateway Phone Refrigerator Light Audio Speaker ZigbeeVIOCS ( ) UPS 02 Home Server PDA Air ConditionerGas
19、 Valve HIFI Audio UPnPMain Entrance Complex Server 03 Digital Cable STB PC Microwave Curtain Camcorder 485 Remote Meter Reading Server Network Device 04 Digital Satellite STB Home Pad Boiler Remote Meter Reading Camera Elevator Open/Close Sensor 05 Digital DMB STB Video Phone Oven Door Lock Scanner
20、CCTV AP 06 Digital IP STB Smart TV Laundry HVAC Printer Auto Parcel 07 Wall Pad Smart Phone Running Machine Batch Breaker Display Mobile Server 08 Health Device ExpansionSecurity Lobby Phone 09 Coffee Machine Thermostat 0A Fan Door Bell 0B Heater Ventilation 0C Temperature Control 0F KS X 4505 1:201
21、2 9 6 Result Code Result Code . Result Code 2Bytes Hex Code , Common Error, Device Specific Error, User Defined Error . Result Code 5 , . Common Error Hex Code 0000 0FFF , D-MAP Operation Code Error . Operation Error, Transaction Error, File-related Error, Apply-related Error , . Operation Error: He
22、ader Payload , OP code Transaction Error: Operation , Transaction File-related Error: Apply-related Error: Apply Operation Device Specific Error Device Architecture Function Property . Error Hex Code 1000 EFFF . User Defined Error Common Operation , , Specific Error Hex Code F000 FFFF . 5 Result Cod
23、e Result Code Description Result Code (Hex) Description 0000 Success 0100 Head Type Error 0101 Head Message Version Error 0102 Head Message Length Error 0103 Head Source ID Error 0104 Head Destination ID Error 0105 Head OP Code Error 0106 Head TransactionID Error 0107 Head CRC Error 0200 Payload Err
24、or 0201 Payload . 0202 Payload . 0203 Payload . 0204 Payload . 0300 . 0301 Status Busy 0302 Resource Deadlock 0000 0FFF (Common Error based on Common Profile Function) 0000 09FF (Operation Errors) 0303 . KS X 4505 1:2012 10 5 Result Code( ) Result Code Description 0000 Transaction OK 0A01 Transactio
25、n 0A02 Transaction ( ) 0A03 Deadlock( . ) 0AXX (Transaction Error based on Common Profile Function) 0A04 Transaction Timeover 0000 OK 0B01 0B02 . 0B03 0B04 . 0B05 0B06 . 0B07 0B08 . 0B09 0B0A 0B0B . 0B0C , . 0B0D . 0B0E 0B0F 0B10 0B11 . 0B12 . 0B13 . 0BXX (File-related Errors) 0B14 0000 OK 0C01 Appl
26、y 0C02 Apply . 0C03 Apply 0C0A Apply . 0C0B Apply . 0CXX (Apply related Errors) 0C0C Apply . 0D00 0FFF ReservedF000 FFFF Device Specific Error Code 1000 EFFF User defined Error code 7 Operation Code Payload Message Message Header Payload , Payload Header OP Code XML . OP Code Payload Message . KS X 4505 1:2012 11 7.1 DEVICE_DISCOVERY_REQUEST DEVICE_DISCOVERY_REQUEST ( ) , . DEVICE_DISCOVERY_REQUEST Payload 6 . Parameter DiscoveryReqType Discovery . , , , , 16 Bytes string . StrTypeReq DiscoveryReqType DeviceID DeviceName DeviceID DeviceName , Hex
copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1