diff --git a/grc/rds_encoder.block.yml b/grc/rds_encoder.block.yml index b7fb61c..8ac5e55 100644 --- a/grc/rds_encoder.block.yml +++ b/grc/rds_encoder.block.yml @@ -1,109 +1,114 @@ -# auto-generated by grc.converter +# Auto-generated by grc.converter id: rds_encoder label: RDS Encoder category: '[RDS]' parameters: -- id: pty_locale - label: PTY Locale - dtype: int - default: '0' - options: ['0', '1'] + - id: af1 + label: AF1 + dtype: float + default: None + optional: true option_labels: [Europe, North America] -- id: pty + + - id: pty label: PTY dtype: int default: '14' options: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', - '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', - '26', '27', '28', '29', '30', '31'] - option_labels: [Undefined, News, Current Affairs / Information, Information / - Sports, Sport / Talk, Education / Rock, Drama / Classic Rock, Culture - / Adult Hits, Science / Soft Rock, Varied / Top 40, Pop Music / Country, - Rock Music / Oldies, Easy Listening / Soft, Light Classical / Nostalgia, Serious - Classical / Jazz, Other Music / Classical, Weather / Rhythm & Blues, Finance - / Soft Rhythm & Blues, "Children\u2019s Programmes / Language", Social - Affairs / Religious Music, Religion / Religious Talk, Phone-In / Personality, - Travel / Public, Leisure / College, Jazz Music / Spanish Talk, Country Music - / Spanish Music, National Music / Hip Hop, Oldies Music / Unassigned, - Folk Music / Unassigned, Documentary / Weather, Alarm Test / Emergency Test, - Alarm / Emergency] -- id: ms + '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', + '26', '27', '28', '29', '30', '31'] + option_labels: [Undefined, News, Current Affairs, Information, Sports, Talk, Education, + Rock, Drama, Classic Rock, Culture, Adult Hits, Science, Soft Rock, + Pop Music, Country, Rock Music, Oldies, Easy Listening, Soft, + Light Classical, Nostalgia, Serious Classical, Jazz, Other Music, + Classical, Weather, Rhythm & Blues, Finance, Soft Rhythm & Blues, + Children's Programmes, Language, Social Affairs, Religious Music, + Religion, Religious Talk, Phone-In, Personality, Travel, Public, + Leisure, College, Jazz Music, Spanish Talk, Country Music, Spanish Music, + National Music, Hip Hop, Oldies Music, Folk Music, Documentary, + Weather, Alarm Test, Emergency Test, Alarm, Emergency] + + - id: ms label: MS dtype: bool default: 'True' options: ['True', 'False'] option_labels: [Music, Speech] -- id: ps + + - id: ps label: PS dtype: string default: WDR 3 -- id: af1 - label: AF1 - dtype: float - default: 89.8e6 -- id: tp + + - id: tp label: TP dtype: bool default: 'True' options: ['True', 'False'] -- id: ta + + - id: ta label: TA dtype: bool default: 'False' options: ['True', 'False'] -- id: pi_country_code + + - id: pi_country_code label: PI Country Code dtype: int default: '13' - options: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', - '15'] + options: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '15'] option_labels: [Other, DE, DZ, AD, IL, IT, BE, RU, PS, AL, AT, HU, MT, DE, EG] -- id: pi_coverage_area + + - id: pi_coverage_area label: PI Coverage Area dtype: int default: '3' options: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', - '13', '14', '15'] - option_labels: [Local, International, National, Supra-regional, Regional 1, Regional - 2, Regional 3, Regional 4, Regional 5, Regional 6, Regional 7, Regional - 8, Regional 9, Regional 10, Regional 11, Regional 12] + '13', '14', '15'] + option_labels: [Local, International, National, Supra-regional, Regional 1, Regional 2, + Regional 3, Regional 4, Regional 5, Regional 6, Regional 7, Regional 8, + Regional 9, Regional 10, Regional 11, Regional 12] hide: ${ ('all' if str(pi_country_code) == '0' else 'none') } -- id: pi_reference_number + + - id: pi_reference_number label: ${ ('PI Code' if str(pi_country_code) == '0' else 'PI Program Reference Number') } dtype: int default: '147' -- id: radiotext + + - id: radiotext label: Radiotext dtype: string default: GNU Radio <3 inputs: -- domain: message - id: rds in + - domain: message + id: rds_in optional: true outputs: -- domain: stream + - domain: stream dtype: byte templates: - imports: import rds - make: "rds.encoder(${pty_locale}, ${pty}, ${ms}, ${ps}, ${af1},\n\t\t\t${tp},\ - \ ${ta}, ${pi_country_code}, ${pi_coverage_area},\n\t\t\t${pi_reference_number},\ - \ ${radiotext})\n\t" - callbacks: - - set_ps(${ps}) - -documentation: |- - PTY: Program Type (depending on PTY locale) - MS: Speech/Music - PS: Program Service Name - AF: Alternate Frequency - TP: Traffic Program - TA: Traffic Announcment - PI: Program Identification (country code, coverage area, reference number) - Radiotext: Radiotext (obviously) + make: "rds.encoder(${pty_locale}, ${pty}, ${ms}, ${ps}" +% if af1 is not None: +make += ", ${af1}" +% endif +make += ", ${tp}, ${ta}, ${pi_country_code}, ${pi_coverage_area}, ${pi_reference_number}, ${radiotext})" + +callbacks: + - set_ps(${ps}) + +documentation: | + PTY: Program Type (depending on PTY locale) + MS: Speech/Music + PS: Program Service Name + AF: Alternate Frequency + TP: Traffic Program + TA: Traffic Announcement + PI: Program Identification (country code, coverage area, reference number) + Radiotext: Radiotext (obviously) file_format: 1