EMMG MUX TCP-based protocol

本文详细介绍了EMMG与MUX之间的交互协议,包括参数定义、带宽分配、错误处理等核心内容,并提供了实现该协议时需要注意的关键点。

 

First introduce some Parameter definitions:

bandwidth: this parameter indicates the requested bit rate or the allocated bit rate respectively. It is the responsibility of the EMMG/PDG to maintain the bit rate generated within the limits specified by the MUX when the bandwidth allocation method is used (optional). It should be noted that the EMMG/PDG will operate from 0 kbit/s to the negotiated rate. The EMMG/PDG will not exceed the

negotiated rate.

 

client_id: the client_id is a 32-bit identifier. It shall identify uniquely an EMMG/PDG across all the EMMGs/PDGs connected to a given MUX. To facilitate uniqueness of this value, the following rules apply:

in the case of EMMs or other CA related data, the two first bytes of the client_id should be equal to the two bytes of the corresponding CA_system_id;

in other cases a value allocated by DVB for this purpose should be used.

 

data_stream_id: this identifier uniquely identifies an EMM/private data stream within a channel.

data_channel_id: this identifier uniquely identifies an EMM/private data channel within a client_id.

 

data_id: the data_id is allocated by the CAS and uniquely identifies an EMM/private data stream of a client_id.

 When a new EMM/private data stream is created in a transport stream, a new data_id shall be assigned to it by the CAS, according to the operational context (EMM/private data stream creation or EMMG/PDG replacement). The value of the

data_id parameter remains unmodified as long as the EMM/private data stream exists. The combination {stream type + client_id + data_id} identifies uniquely this new EMM/private data stream in the whole system.

 

data_type: type of data carried in the datagram in the stream:

0x00: EMM;

0x01: private data;

0x02: DVB reserved (ECM);

other values: DVB reserved.

 

datagram: this is the EMM/private data. The Datagram can be transferred in either section or TS packet format according to the value of section_TSpkt_flag.

 

section_TSpkt_flag: this parameter defines the format of the EMMs or of the private datagrams carried on this interface:

0x00: the EMMs or private datagrams are in MPEG-2 section format;

0x01: the EMMs or private datagrams are in MPEG-2 transport stream packet format; all TS packets shall be 188 byte long, any other payload length being considered as an error; it is the head-end's responsibility to fill

the PID field in TS packet header;

 

 

Then there are some Notes for EMMG <==> MUX TCP-based protocol

 

The EMMG is the client and the MUX is the server. The details of the protocol:

1.      Channel establishment

a)      Process:

                    i.              The EMMG sends a channel_setup message to the MUX.

                ii.              In case of success the MUX replies by sending back a channel_status message.

            iii.              In case of a rejection or a failure during channel setup the MUX replies with a channel_error message. This means that the channel has not been opened by the MUX and the EMMG/PDG shall close the TCP connection.

b)      Notes:

                    i.              The EMMG/PDG indicates at channel setup data object will be transferred as sections or as TS packets.

                ii.              The EMMs/private data shall be inserted in the transport stream in the same order as they are provided by the EMMG/PDG.

            iii.               

c)      Message

                    i.              Channel_setup message(0x0011): EMMG/PDG MUX

Parameter Number of instances in message

client_id         1   0x0001 4

data_channel_id   1   0x0003 2

section_TSpkt_flag 1 0x0002 1

 

                ii.              Channel_test message(0x0012): EMMG/PDG <==> MUX

Parameter Number of instances in message

client_id         1   0x0001 4

data_channel_id   1   0x0003 2

 

            iii.              Channel_status message(0x0013): EMMG/PDG <==> MUX

Parameter Number of instances in message

client_id         1   0x0001 4

data_channel_id   1   0x0003 2

section_TSpkt_flag   1   0x0002 1

notes:

All the parameters listed above are mandatory.

When the message is a response to a set-up, the values of the parameters are those requested by the EMMG/PDG and currently stored in the MUX. All these parameter values will be valid during the whole life time of the channel, for all the streams running on it.

When the message is a response to a test, the values of the parameters shall be those currently valid in the channel.

 

                iv.              Channel_close message(0x0014): EMMG/PDG => MUX

Channel closure can occur when the channel is no longer needed or in case of error (detected by EMMG/PDG or reported by MUX).

This is done by means of a channel_close message sent by the EMMG/PDG.

Subsequently, the connection shall be closed by both sides.

Parameter Number of instances in message

client_id         1   0x0001 4

data_channel_id   1   0x0003 2

only sent by the EMMG/PDG.

 

                    v.              Channel_error message(0x0015): EMMG/PDG <==> MUX

Parameter Number of instances in message

client_id         1   0x0001 4

data_channel_id   1   0x0003 2

error_status 1 to n   0x7000 2

error_information 0ton 0x7001   n

 

2.      Stream establishment

a)      Process:

                    i.              The EMMG/PDG sends a stream_setup message to the MUX.

                ii.              In case of success the MUX replies by sending back a stream_status message.

            iii.              In case of a rejection or a failure the MUX replies with a stream_error message.

b)      Message

                    i.              Stream_setup message(0x0111): EMMG/PDG => MUX

Parameter Number of instances in message

client_id         1   0x0001 4

data_channel_id   1   0x0003 2

data_stream_id       1   0x0004 2

data_id           1   0x0008 2

data_type         1   0x0007 1

 

                ii.              Stream_test message(0x0112): EMMG/PDG <=> MUX

Parameter Number of instances in message

client_id         1   0x0001 4

data_channel_id   1   0x0003 2

data_stream_id       1   0x0004 2

 

            iii.              Stream_status message(0x0113): EMMG/PDG <=> MUX

Parameter Number of instances in message

client_id         1   0x0001 4

data_channel_id   1   0x0003 2

data_stream_id       1   0x0004 2

data_id           1   0x0008 2

data_type         1   0x0007 1

The values of the parameters shall be those currently valid in the stream.

 

                iv.              Stream_close_request message(0x0114): EMMG/PDG MUX

Parameter Number of instances in message

client_id         1   0x0001 4

data_channel_id   1   0x0003 2

data_stream_id       1   0x0004 2

Stream closure is always initiated by the EMMG/PDG.

This can occur when an EMM/private data stream is no longer needed.

 

                    v.              Stream_close_response message(0x0115): EMMG/PDG <== MUX

Parameter Number of instances in message

client_id         1   0x0001 4

data_channel_id   1   0x0003 2

data_stream_id       1   0x0004 2

The stream_close_response message is sent by the MUX.

 

                vi.              Stream_error message(0x0116): EMMG/PDG <=> MUX

Parameter Number of instances in message

client_id         1   0x0001 4

data_channel_id   1   0x0003 2

data_stream_id       1   0x0004 2

error_status 1 to n   0x7000 2

error_information 0ton 0x7001   n

 

A stream_error message is sent by the recipient of a stream_test message or by the MUX at any time to indicate that an unrecoverable stream level error occurred.

 

3.      Bandwidth allocation

a)      Notes:

                    i.              The interface allows bandwidth negotiation between the EMMG/PDG and the MUX. This is not mandatory.

b)      Process:

                    i.              EMMG/PDG will request the optimal bandwidth for that stream.

                ii.              The MUX will then respond with the bandwidth that has been allocated for that stream. The EMMG/PDG can, at a later time, request an adjustment in the bandwidth allocation. The MUX could also initiate an allocation change, without any request from the EMMG/PDG.

c)      Message

                    i.              Stream_BW_request message(0x0117): EMMG/PDG MUX

Parameter Number of instances in message

client_id         1   0x0001 4

data_channel_id   1   0x0003 2

data_stream_id       1   0x0004 2

bandwidth         0to1   0x0006 2

The stream_BW_request message is sent by the EMMG/PDG and can be used in two

ways.

1, If the bandwidth parameter is present the message is a request for the indicated amount of bandwidth.

2, If the bandwidth parameter is not present the message is just a request for information about the currently allocated bandwidth.

The MUX shall always reply to this message with a stream_BW_allocation message.

                ii.              Stream_BW_allocation message(0x0118): EMMG/PDG <== MUX

Parameter Number of instances in message

client_id         1   0x0001 4

data_channel_id   1   0x0003 2

data_stream_id       1   0x0004 2

bandwidth         0to1   0x0006 2

The stream_BW_allocation message is used to inform the EMMG/PDG about the bandwidth allocated. This can be a response to a stream_BW_request message or as a notification of a change in bandwidth initiated by the MUX. The message is always sent by the MUX.

If the bandwidth parameter is not present it means that the allocated bandwidth is not known.(?? what to do then)

NOTE: The bandwidth allocation message may indicate a different bandwidth than was requested (this could be less).

 

            iii.              Data_provision message: EMMG/PDG MUX

Parameter Number of instances in message

client_id         1   0x0001 4

data_channel_id   1   0x0003 2

data_stream_id       1   0x0004 2

data_id           1   0x0008 2

datagram          1to n 0x0005  User define

The data_provision message is used by the EMMG/PDG to send, on a given data_stream_id, the datagram (in the case of EMMG this is EMM data).

 

4.      Error process

a)      Error status

Only channel, stream and application level errors occur during the lifetime of a TCP connection.

There are two different error messages on that interface.

The channel_error message for channel wide errors;

the stream_error message for stream specific errors.

These messages are sent by the MUX to the EMMG/PDG. When the MUX reports an error to the EMMG/PDG, it is up to the EMMG/PDG to decide the most appropriate step to be taken.

However "unrecoverable error" explicitly means that the channel or stream (depending on the message used) has to be closed. Most error status listed in table 8 cannot occur in normal operation. They are mainly provided to facilitate the integration and debugging phase.

 

b)      Unexpected connection loss

Both EMMG/PDG and MUX shall be able to handle an unexpected communication loss (either on the connection, channel or stream level).

Each component, when suspecting a possible communication loss (e.g. a 10 second silent period), should check the communication status by sending a test message and expecting to receive a status message. If the status message is not received in a given time (implementation specific) the communication path should be re-established.

 

c)      Handling data inconsistencies

If the MUX detects an inconsistency it shall send an error message to the EMMG/PDG.

If the EMMG/PDG receives such a message or detects an inconsistency it should close the connection.

The EMMG/PDG (as the client) will then (re-) establish the connection, channel and (if applicable) streams.

NOTE: The occurrence of a user defined or unknown parameter_type or message_type shall not be considered as an inconsistency.

 

And finally the Summary:

When we implement the EMMG,

1.      Stream or channel over time needs to be checked for connection loss.

2.      only the client close channel.

3.      when error happens, send channel error message then close the channel directly, and the EMMG should reconnect to MUX.

4.      stream close is sent only when private message is not needed.

5.      the EMMG must be ready to handle the Stream_BW_allocation message at anytime, to redefine the sending speed of private data.

6.      when error happens, it’s up to EMMG to decide how to deal with the error.

7.      only MUX report error message.

8.      data inconsistencies happens, the EMMG close channel directly.

 

六自由度机械臂ANN人工神经网络设计:正向逆向运动学求解、正向动力学控制、拉格朗日-欧拉法推导逆向动力学方程(Matlab代码实现)内容概要:本文档围绕六自由度机械臂的ANN人工神经网络设计展开,详细介绍了正向与逆向运动学求解、正向动力学控制以及基于拉格朗日-欧拉法推导逆向动力学方程的理论与Matlab代码实现过程。文档还涵盖了PINN物理信息神经网络在微分方程求解、主动噪声控制、天线分析、电动汽车调度、储能优化等多个工程与科研领域的应用案例,并提供了丰富的Matlab/Simulink仿真资源和技术支持方向,体现了其在多学科交叉仿真与优化中的综合性价值。; 适合人群:具备一定Matlab编程基础,从事机器人控制、自动化、智能制造、电力系统或相关工程领域研究的科研人员、研究生及工程师。; 使用场景及目标:①掌握六自由度机械臂的运动学与动力学建模方法;②学习人工神经网络在复杂非线性系统控制中的应用;③借助Matlab实现动力学方程推导与仿真验证;④拓展至路径规划、优化调度、信号处理等相关课题的研究与复现。; 阅读建议:建议按目录顺序系统学习,重点关注机械臂建模与神经网络控制部分的代码实现,结合提供的网盘资源进行实践操作,并参考文中列举的优化算法与仿真方法拓展自身研究思路。
YAHboom YB-MUX04-1.0 是一款基于多路复用器(MUX)设计的硬件开发模块,主要用于信号选择和控制应用。该模块的设计可能与FPGA或嵌入式系统开发相关,其功能类似于引用中提到的MUX16实现,但具体实现方式和应用场景会有所不同。 ### 产品功能 YB-MUX04-1.0 是一个4通道输入、1通道输出的多路复用器模块。它通过选择信号控制哪一路输入信号被传输到输出端。模块通常由数字控制信号(例如A1和A0)来选择输入通道,这与引用中提到的MUX16模块的原理类似,但规模较小。多路复用器在数字电路设计中广泛用于信号路由、数据选择和资源共享等场景。 ### 技术规格 虽然具体的技术规格可能需要参考YAHboom官方文档,但通常包括以下内容: - **输入通道数量**:4路 - **输出通道数量**:1路 - **控制信号**:2位地址线(A1和A0)用于选择输入通道 - **电源要求**:通常为3.3V或5V - **兼容性**:支持与FPGA开发板、微控制器(如Arduino)或其他数字电路系统连接 ### 使用方法 YB-MUX04-1.0的使用方法通常包括以下几个步骤: 1. **硬件连接**:将模块的输入端连接到需要选择的信号源,输出端连接到目标设备(例如ADC、传感器或其他数字电路)。 2. **控制信号配置**:通过微控制器或FPGA向模块的地址引脚(A1和A0)发送控制信号以选择特定输入通道。例如: - A1A0 = 00:选择输入D0 - A1A0 = 01:选择输入D1 - A1A0 = 10:选择输入D2 - A1A0 = 11:选择输入D3 3. **信号处理**:根据选择的输入通道,将输出信号用于后续处理或分析。 以下是一个简单的Verilog代码示例,用于实现一个4选1多路复用器,类似于YB-MUX04-1.0的功能: ```verilog module mux4to1( input [3:0] data_in, // 4位输入信号 input [1:0] select, // 2位选择信号 output reg data_out // 输出信号 ); always @(*) begin case (select) 2'b00: data_out = data_in[0]; 2'b01: data_out = data_in[1]; 2'b10: data_out = data_in[2]; 2'b11: data_out = data_in[3]; default: data_out = data_in[0]; // 默认选择第一个输入 endcase end endmodule ``` ### 应用场景 YB-MUX04-1.0模块广泛应用于需要多路信号选择的场合,例如: - 数据采集系统中的信号切换 - 测试设备中的多路信号路由 - 工业控制系统中的传感器信号选择 ###
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值