libnrsc5 5032de3
NRSC-5 digital radio via the RTL-SDR
Loading...
Searching...
No Matches
Data Fields
nrsc5_event_t Struct Reference

#include <nrsc5.h>

Data Fields

unsigned int event
 
union { 
 
   struct { 
 
      const void *   data 
 
      size_t   count 
 
   }   iq 
 
   struct { 
 
      float   freq_offset 
 
      int   psmi 
 
   }   sync 
 
   struct { 
 
      float   cber 
 
   }   ber 
 
   struct { 
 
      float   lower 
 
      float   upper 
 
   }   mer 
 
   struct { 
 
      unsigned int   program 
 
      const uint8_t *   data 
 
      size_t   count 
 
   }   hdc 
 
   struct { 
 
      unsigned int   program 
 
      const int16_t *   data 
 
      size_t   count 
 
   }   audio 
 
   struct { 
 
      unsigned int   program 
 
      const char *   title 
 
      const char *   artist 
 
      const char *   album 
 
      const char *   genre 
 
      struct { 
 
         const char *   owner 
 
         const char *   id 
 
      }   ufid 
 
      struct { 
 
         uint32_t   mime 
 
         int   param 
 
         int   lot 
 
      }   xhdr 
 
      nrsc5_id3_comment_t *   comments 
 
   }   id3 
 
   struct { 
 
      uint16_t   port 
 
      uint16_t   seq 
 
      unsigned int   size 
 
      uint32_t   mime 
 
      const uint8_t *   data 
 
      nrsc5_sig_service_t *   service 
 
      nrsc5_sig_component_t *   component 
 
   }   stream 
 
   struct { 
 
      uint16_t   port 
 
      uint16_t   seq 
 
      unsigned int   size 
 
      uint32_t   mime 
 
      const uint8_t *   data 
 
      nrsc5_sig_service_t *   service 
 
      nrsc5_sig_component_t *   component 
 
   }   packet 
 
   struct { 
 
      uint16_t   port 
 
      unsigned int   lot 
 
      unsigned int   size 
 
      uint32_t   mime 
 
      const char *   name 
 
      const uint8_t *   data 
 
      struct tm *   expiry_utc 
 
      nrsc5_sig_service_t *   service 
 
      nrsc5_sig_component_t *   component 
 
   }   lot 
 
   struct { 
 
      unsigned int   lot 
 
      unsigned int   seq 
 
      unsigned int   repeat 
 
      unsigned int   size 
 
      unsigned int   bytes_so_far 
 
      int   is_duplicate 
 
      const uint8_t *   data 
 
      nrsc5_sig_service_t *   service 
 
      nrsc5_sig_component_t *   component 
 
   }   lot_fragment 
 
   struct { 
 
      unsigned int   program 
 
      unsigned int   access 
 
      unsigned int   type 
 
      unsigned int   codec_mode 
 
      unsigned int   blend_control 
 
      int   digital_audio_gain 
 
      unsigned int   common_delay 
 
      unsigned int   latency 
 
   }   audio_service 
 
   struct { 
 
      nrsc5_sig_service_t *   services 
 
   }   sig 
 
   struct { 
 
      const char *   country_code 
 
      int   fcc_facility_id 
 
      const char *   name 
 
      const char *   slogan 
 
      const char *   message 
 
      const char *   alert 
 
      float   latitude 
 
      float   longitude 
 
      int   altitude 
 
      nrsc5_sis_asd_t *   audio_services 
 
      nrsc5_sis_dsd_t *   data_services 
 
      const uint8_t *   alert_cnt 
 
      int   alert_cnt_length 
 
      int   alert_category1 
 
      int   alert_category2 
 
      int   alert_location_format 
 
      int   alert_num_locations 
 
      const int *   alert_locations 
 
   }   sis 
 
   struct { 
 
      const char *   country_code 
 
      int   fcc_facility_id 
 
   }   station_id 
 
   struct { 
 
      const char *   name 
 
   }   station_name 
 
   struct { 
 
      const char *   slogan 
 
   }   station_slogan 
 
   struct { 
 
      const char *   message 
 
   }   station_message 
 
   struct { 
 
      float   latitude 
 
      float   longitude 
 
      int   altitude 
 
   }   station_location 
 
   struct { 
 
      unsigned int   program 
 
      unsigned int   access 
 
      unsigned int   type 
 
      unsigned int   sound_exp 
 
   }   asd 
 
   struct { 
 
      unsigned int   access 
 
      unsigned int   type 
 
      uint32_t   mime_type 
 
   }   dsd 
 
   struct { 
 
      const char *   message 
 
      const uint8_t *   control_data 
 
      int   control_data_length 
 
      int   category1 
 
      int   category2 
 
      int   location_format 
 
      int   num_locations 
 
      const int *   locations 
 
   }   emergency_alert 
 
   struct { 
 
      int   image_type 
 
      int   seq 
 
      int   n1 
 
      int   n2 
 
      struct tm *   time_utc 
 
      float   latitude1 
 
      float   longitude1 
 
      float   latitude2 
 
      float   longitude2 
 
      const char *   name 
 
      unsigned int   size 
 
      const uint8_t *   data 
 
   }   here_image 
 
};  
 

Detailed Description

Incoming event from receiver.

This event structure is passed to your application supplied callback function–see nrsc5_set_callback(). It is a union of various structs, keyed by member event.

Field Documentation

◆ access

unsigned int nrsc5_event_t::access

NRSC5_ACCESS_PUBLIC or NRSC5_ACCESS_RESTRICTED

◆ blend_control

unsigned int nrsc5_event_t::blend_control

blend control (NRSC5_BLEND_DISABLE, NRSC5_BLEND_SELECT, or NRSC5_BLEND_ENABLE). See SY_IDD_1017s section 5.2.1.2.

◆ bytes_so_far

unsigned int nrsc5_event_t::bytes_so_far

total number of bytes received for this LOT file, across all received fragments

◆ codec_mode

unsigned int nrsc5_event_t::codec_mode

audio codec mode. See SY_IDD_1017s Table 5-2.

◆ common_delay

unsigned int nrsc5_event_t::common_delay

post-decoded common delay, in audio frame periods. See SY_IDD_1017s Table 5-1.

◆ component

nrsc5_sig_component_t* nrsc5_event_t::component

pointer to the associated SIG component

◆ data

const uint8_t* nrsc5_event_t::data

contents of the file (if the event type is NRSC5_EVENT_LOT), or NULL (if the event type is NRSC5_EVENT_LOT_HEADER)

pointer to the data bytes of this fragment

contents of image file

◆ digital_audio_gain

int nrsc5_event_t::digital_audio_gain

TX digital audio gain, in dB. See SY_IDD_1017s section 5.2.1.3.

◆ event

unsigned int nrsc5_event_t::event

Type of event. The member event determines which sort of event occurred:

  • NRSC5_EVENT_LOST_DEVICE : RTL-SDR device was disconnected
  • NRSC5_EVENT_IQ : IQ data, see the iq union member
  • NRSC5_EVENT_SYNC : indicates synchronization achieved, see the sync union member
  • NRSC5_EVENT_LOST_SYNC : indicates synchronization lost
  • NRSC5_EVENT_MER : modulation error ratio, see the mer union member, and NRSC5 document SY_TN_2646s
  • NRSC5_EVENT_BER : Bit Error Ratio data, see the ber union member
  • NRSC5_EVENT_HDC : HDC audio packet, see the hdc union member
  • NRSC5_EVENT_AUDIO : audio buffer, see the audio union member
  • NRSC5_EVENT_ID3 : ID3 information packet arrived, see id3 member and information in HD-Radio document SY_IDD_1028s.
  • NRSC5_EVENT_SIG : service information arrived, see sig member
  • NRSC5_EVENT_LOT : LOT file data available, see lot member
  • NRSC5_EVENT_LOT_HEADER : LOT file header metadata available, see lot member
  • NRSC5_EVENT_LOT_FRAGMENT : fragment of a LOT file received, see lot_fragment member
  • NRSC5_EVENT_SIS : DEPRECATED. Use NRSC5_EVENT_STATION_ID, NRSC5_EVENT_STATION_NAME, NRSC5_EVENT_STATION_SLOGAN, NRSC5_EVENT_STATION_MESSAGE, NRSC5_EVENT_STATION_LOCATION, NRSC5_EVENT_AUDIO_SERVICE_DESCRIPTOR, NRSC5_EVENT_DATA_SERVICE_DESCRIPTOR, and NRSC5_EVENT_EMERGENCY_ALERT instead.
  • NRSC5_EVENT_STREAM : stream data available, see stream member
  • NRSC5_EVENT_PACKET : packet data available, see packet member
  • NRSC5_EVENT_AUDIO_SERVICE : audio service available, see audio_service member
  • NRSC5_EVENT_STATION_ID : station ID number, see station_id member
  • NRSC5_EVENT_STATION_NAME : station name, see station_name member
  • NRSC5_EVENT_STATION_SLOGAN : station slogan, see station_slogan member
  • NRSC5_EVENT_STATION_MESSAGE : station message, see station_message member
  • NRSC5_EVENT_STATION_LOCATION : station location, see station_location member
  • NRSC5_EVENT_AUDIO_SERVICE_DESCRIPTOR : SIS audio service descriptor, see asd member
  • NRSC5_EVENT_DATA_SERVICE_DESCRIPTOR : SIS data service descriptor, see dsd member
  • NRSC5_EVENT_EMERGENCY_ALERT : emergency alert, see emergency_alert member
  • NRSC5_EVENT_HERE_IMAGE : HERE Images traffic/weather map, see here_image member

◆ expiry_utc

struct tm* nrsc5_event_t::expiry_utc

time after which the file should be deleted

◆ freq_offset

float nrsc5_event_t::freq_offset

Frequency offset in Hz

◆ image_type

int nrsc5_event_t::image_type

NRSC5_HERE_IMAGE_TRAFFIC or NRSC5_HERE_IMAGE_WEATHER

◆ is_duplicate

int nrsc5_event_t::is_duplicate

1 if this fragment was previously received, otherwise 0

◆ latency

unsigned int nrsc5_event_t::latency

audio codec latency, in audio frame periods. See SY_IDD_1017s Table 5-1.

◆ latitude1

float nrsc5_event_t::latitude1

latitude of north map edge

◆ latitude2

float nrsc5_event_t::latitude2

latitude of south map edge

◆ longitude1

float nrsc5_event_t::longitude1

longitude of west map edge

◆ longitude2

float nrsc5_event_t::longitude2

longitude of east map edge

◆ lot

unsigned int nrsc5_event_t::lot

LOT id of the file

LOT id of the file this fragment belongs to

◆ mime

uint32_t nrsc5_event_t::mime

DEPRECATED: Use component->data.mime instead

MIME type of the file, e.g. NRSC5_MIME_PNG

◆ mime_type

uint32_t nrsc5_event_t::mime_type

MIME type, e.g. NRSC5_MIME_TEXT

◆ n1

int nrsc5_event_t::n1

part number (1-9) for traffic, or incrementing sequence number for weather

◆ n2

int nrsc5_event_t::n2

number of parts (9) for traffic, or incrementing sequence number for weather

◆ name

const char* nrsc5_event_t::name

filename

filename, e.g. "trafficMap_1_2_rdhs.png" or "WeatherImage_0_0_rdhs.png"

◆ port

uint16_t nrsc5_event_t::port

DEPRECATED: Use component->data.port instead

◆ program

unsigned int nrsc5_event_t::program

program number 0, 1, ..., 7

◆ psmi

int nrsc5_event_t::psmi

Primary Service Mode Indicator (1, 2, 3, 5, 6, or 11 for FM; 1 or 2 for AM)

◆ repeat

unsigned int nrsc5_event_t::repeat

number of repetitions remaining

◆ seq [1/2]

unsigned int nrsc5_event_t::seq

sequence number of this fragment within the LOT file

◆ seq [2/2]

int nrsc5_event_t::seq

sequence number (1-15); increments when traffic/weather image changes

◆ service

nrsc5_sig_service_t* nrsc5_event_t::service

pointer to the associated SIG service

◆ size

unsigned int nrsc5_event_t::size

number of bytes in the file

number of bytes in this fragment

size of image file, in bytes

◆ sound_exp

unsigned int nrsc5_event_t::sound_exp

0 is none, 2 is Dolby Pro Logic II Surround

◆ time_utc

struct tm* nrsc5_event_t::time_utc

UTC time of traffic or weather image

◆ type

unsigned int nrsc5_event_t::type

program type, e.g. NRSC5_PROGRAM_TYPE_JAZZ

data service type, e.g. NRSC5_SERVICE_DATA_TYPE_TEXT


The documentation for this struct was generated from the following file: