ahapToWaveform function
Implementation
Waveform ahapToWaveform(String ahap) {
try {
List<AhapEvent> ahapEvents = parseAhapEventsFromJson(ahap);
return createWaveformFromAhapEvents(ahapEvents);
} catch (e) {
throw Exception('Invalid AHAP JSON');
}
}