Friday, April 13, 2018 5:13 AM > > +typedef tmv_t PMTimestamp;
> This typedef serves no useful purpose. Just use this... > time_t pm_time; > The PMTime data type is never actually defined in the draft. Brilliant. > It looks like this is only used for very coarse time stamps, and so > the time_t from clock_gettime() should be good enough. No, exactly. The type of the time should be of PMTimestamp so I just defined it in the first step when I just wrote down the structs directly from the draft. I did not pay any intention on it later. Offcourse it serves no purpose as it is now. I will change this. > Also, we don't use mixed case for internal data. Only when there is > direct connection to some member of a 1588 data set do we use > camelCase in order to make the connection clear. As a matter of taste > I shun camelCase, but I do think using the same words as in a standard, > data sheet, or Technical Reference Manual is a good practice. I agree, sometime it is hard to decide which one to use. I know that snake_case are used in linux in general but standard do preffer camelCase. > Here I prefer 'master_slave_delay'. The word "masterSlaveDelay" does > not actually appear in Annex M. We do see "MasterSlaveDelay", but > that isn't the name of a data set member, nor is it the field of a > message. No, you are right. masterSlaveDelay do not appear, only MasterSlaveDelay in The description. What do appear is average-, min-, max- and stdDevMasterSlaveDelay. Since all these 4 are calculated in stats, I just added MasterSlaveDelay, and change the capital M to a lowercase m since I never add attributes starting with capital letters (if not any standard tell me to 😊 ) But since this is all local struct, I could have made them into snake_case but I forgot about it / missed it. I will update to snake_case 😊 > The 'struct stats' is purely an invention of the linuxptp stack, and > therefore any instance if it should use a standard name according to > our preferred coding style. I am making sense? Yes, I agree. / Anders ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel