structChannelDetails{charid13[3];// id13 column header value (null terminated c-string)uint8_tmin;// start minute (0, 2, 4, 6, 8)uint32_tfreq;// target frequency, in Hz};classWsprChannelMap{public:// For a given band and channel, get the channel detailsstaticChannelDetailsGetChannelDetails(constchar*band,uint16_tchannel);};
#include<cstdint>#include<iostream>usingnamespacestd;#include"WsprEncoded.h"intmain(){// Configure band and channelconstchar*band="20m";uint16_tchannel=123;// Get channel detailsWsprChannelMap::ChannelDetailscd=WsprChannelMap::GetChannelDetails(band,channel);// Examine the detailscout<<"Channel Details for band "<<band<<", channel "<<channel<<endl;cout<<"id13: "<<cd.id13<<endl;cout<<"min : "<<(int)cd.min<<endl;cout<<"freq: "<<cd.freq<<endl;return0;}
Output
Channel Details for band 20m, channel 123
id13: 06
min : 4
freq: 14097020