Main Content

registerODA

Register custom encoding implementation for ODA

Description

example

registerODA(rbdsgen,odaID,group,handleMain,handle3A) associates the open data application (ODA) specified by the hexadecimal ID odaID, with the type group groups generated by rbdsgen. The four 16-bit information words of these groups are generated by the function handle handleMain. The third information word of type 3A groups, which is ODA-specific, is generated by the function handle handle3A.

Examples

collapse all

Register a custom encoding implementation for an open data application (ODA) by using the registerODA method of the comm.RBDSWaveformGenerator System object™. Set the ODA ID to 'CD46', which is the ID for the traffic message channel. The allocated group type is 8A.

rbds = comm.RBDSWaveformGenerator();
odaID = 'CD46';
allocatedGroupType = '8A';

This example uses the following templates as a starting point for custom encoding implementation.

mainProcessingFcn = @CustomODAEncodingMain;
fcn3A             = @CustomODAEncoding3A;
registerODA(rbds,odaID,allocatedGroupType,mainProcessingFcn,fcn3A);
s = info(rbds);
s.ODAMap
ans=2×1 struct array with fields:
    ID
    GroupType
    FunctionMain
    Function3A

Input Arguments

collapse all

RBDS waveform generator object, specified as a comm.RBDSWaveformGenerator object.

Open data application identification number, specified as a hexadecimal string or character vector.

Example: 'CD46' is the ID for the traffic message channel.

Data Types: char | string

Allocated group type, specified as a hexadecimal string or character vector. The RDS/RBDS standard defines 32 different group types, each labeled with a number from 0 to 15 and the letter 'A' or 'B'. The format of each group can be fixed or if the group is allocated for an open data application, it can be abstract.

Example: "8A", "0B", "2A", "3A"

Data Types: char | string

Open data application function handle, specified as a function handle that generates the four 16-bit information words of these groups.

Example: @RadioTextPlusMainGroup

Third information word of type 3A group function handle, specified as a function handle that generates the ODA-specific third information word of type 3A groups.

Example: @RadioTextPlus3A

Version History

Introduced in R2017a