The below definitions should be changed as the accuracy (fraction digit) can match only to 3.125 granularity.
Should the granularity be finer the fraction digit needs to be extended (e.g. to 9 and 6 for THz and GHz).
typedef frequency-thz {
type decimal64 {
fraction-digits 6;
}
units THz;
description
"The DWDM frequency in THz, e.g., 193.112500";
}
typedef frequency-ghz {
type decimal64 {
fraction-digits 3;
}
units GHz;
description
"The DWDM frequency in GHz, e.g., 193112.500";
}
The below definitions should be changed as the accuracy (fraction digit) can match only to 3.125 granularity. Should the granularity be finer the fraction digit needs to be extended (e.g. to 9 and 6 for THz and GHz).
typedef frequency-thz { type decimal64 { fraction-digits 6; } units THz; description "The DWDM frequency in THz, e.g., 193.112500"; } typedef frequency-ghz { type decimal64 { fraction-digits 3; } units GHz; description "The DWDM frequency in GHz, e.g., 193112.500"; }