More consistent EFFS, FTP, Time-related functons

Discussion to talk about software related topics only.
Post Reply
Ridgeglider
Posts: 513
Joined: Sat Apr 26, 2008 7:14 am

More consistent EFFS, FTP, Time-related functons

Post by Ridgeglider »

Forrest & Paul:

I use a set of files for EFFS, FTP, and the related time-stamp functions that are based on the files in the examples. For whatever reason, NB seems to classify the functions in these files as example functions, not system functions. Because of this, there is always too much inconsistency when updating to new system revs or when changing to different platforms.

One of the issues that complicates this situation is that there are multiple versions of the same file used in the different examples. Because of this, when NB revisions do occur, they are often not applied to all the examples. As a user, I always have to hunt around to see what combination of these files is the right one. I think a lot of these issues could go away if the EFFS, FTP and related time functions were defined/declared in a single, consistently updated set of system/include directories that all the example main.cpp files could reference. The suspect files seem to be:
cardtype.h
effs_time.h and .cpp
FileSystemUtils.h and .cpp
ftp_f.h and .cpp
NTP.h and .cpp

The point’s been made that these are just examples that users would modify to suit their own needs, but from my perspective the EFFS, file-time-stamp, RTC, and FTP functions should really be consistent, utility functions that don’t require much user attention across platforms and updates. Unfortunately, that’s not always the case.

As a case in point, take a look at just two of these files, the effs_time.cpp and .h. In Rel_2_6_0_020, these files show up in 11 different example directories! I file-diffed the directories, and I believe there are actually 4 versions of each these files which I’ve labeled as "Actual Versions" A-D in the attached screen shot.


In these files, the NB rev and date strings are inconsistent. You can find many instances of lower rev nums with newer dates in the files in the example directories. Therefore, rev#s don't hep determine what's the latest. More significantly, within a given example directory, there are mis-matches between some of the .cpp definitions and .h declarations. For example, in the nburn\examples\EFFS\EFFS-FTP example directory, the SetTimeNTP() function declaration in the .h returns a Bool, while the .cpp definition returns a DWORD. These issues are usually straightforward to spot and fix, but that shouldn't be required.

Bottom line, the examples, the EFFS, FTP, RTC, and NTP code are all great, but there could be more code consistency in how the underlying functions are routinely accessed.
effs_time.cpp and .h inconsistencies.png
effs_time.cpp and .h inconsistencies.png (62.47 KiB) Viewed 3212 times
Post Reply