[NUT-devel] Info Packets

Michael Niedermayer michaelni at gmx.at
Sun Feb 19 10:28:39 CET 2006


Hi

Currently info packets are
list of streams
list of name/type/value triplets

i would suggest that we change this to
first name/type/value is the "name/id" of what is described
remander is a list of descriptions
and require that any 2 info packets with the same name/id
be identical

one case where the current variant is unclear is
ChapterId=5
StartTime=1min
StopTime=2min

does this mean Chapter 5 is from 1min to 2min or that the info packet
describes the time from 1min to 2min of chapter 5?


for my suggestion it would be
Chapter 5
---
StartTime=1min
StopTime=2min

vs.
TimeSpan 123
---
Chapter=5
StartTime=1min
StopTime=2min


the following is the simplest way to store things i could come up with:

count                               v
for(i=0; i<count; i++){
    x                               v
    name                            vb
    if(x==0){
        type                        vb
        value                       vb
    }else if(x==1){
        type= "UTF-8"
        value                       vb
    }else{
        type= "rational"
        value.num                   s
        value.den= x-1
    }
}

-- 
Michael




More information about the NUT-devel mailing list