WPILibC++  unspecified
File Save/Load Functions

Functions

const char * NT_SavePersistent (NT_Inst inst, const char *filename)
 Save persistent values to a file. More...
 
const char * NT_LoadPersistent (NT_Inst inst, const char *filename, void(*warn)(size_t line, const char *msg))
 Load persistent values from a file. More...
 
const char * NT_SaveEntries (NT_Inst inst, const char *filename, const char *prefix, size_t prefix_len)
 Save table values to a file. More...
 
const char * NT_LoadEntries (NT_Inst inst, const char *filename, const char *prefix, size_t prefix_len, void(*warn)(size_t line, const char *msg))
 Load table values from a file. More...
 
const char * nt::NetworkTableInstance::SavePersistent (const Twine &filename) const
 Save persistent values to a file. More...
 
const char * nt::NetworkTableInstance::LoadPersistent (const Twine &filename, std::function< void(size_t line, const char *msg)> warn)
 Load persistent values from a file. More...
 
const char * nt::NetworkTableInstance::SaveEntries (const Twine &filename, const Twine &prefix) const
 Save table values to a file. More...
 
const char * nt::NetworkTableInstance::LoadEntries (const Twine &filename, const Twine &prefix, std::function< void(size_t line, const char *msg)> warn)
 Load table values from a file. More...
 
const char * nt::SavePersistent (StringRef filename)
 Save persistent values to a file. More...
 
const char * nt::SavePersistent (NT_Inst inst, const Twine &filename)
 
const char * nt::LoadPersistent (StringRef filename, std::function< void(size_t line, const char *msg)> warn)
 Load persistent values from a file. More...
 
const char * nt::LoadPersistent (NT_Inst inst, const Twine &filename, std::function< void(size_t line, const char *msg)> warn)
 
const char * nt::SaveEntries (NT_Inst inst, const Twine &filename, const Twine &prefix)
 Save table values to a file. More...
 
const char * nt::LoadEntries (NT_Inst inst, const Twine &filename, const Twine &prefix, std::function< void(size_t line, const char *msg)> warn)
 Load table values from a file. More...
 

Detailed Description

Function Documentation

const char * nt::NetworkTableInstance::LoadEntries ( const Twine filename,
const Twine prefix,
std::function< void(size_t line, const char *msg)>  warn 
)
inline

Load table values from a file.

The file format used is identical to that used for SavePersistent / LoadPersistent.

Parameters
filenamefilename
prefixload only keys starting with this prefix
warncallback function for warnings
Returns
error string, or nullptr if successful
const char * nt::LoadEntries ( NT_Inst  inst,
const Twine filename,
const Twine prefix,
std::function< void(size_t line, const char *msg)>  warn 
)

Load table values from a file.

The file format used is identical to that used for SavePersistent / LoadPersistent.

Parameters
instinstance handle
filenamefilename
prefixload only keys starting with this prefix
warncallback function for warnings
Returns
error string, or nullptr if successful
const char * nt::NetworkTableInstance::LoadPersistent ( const Twine filename,
std::function< void(size_t line, const char *msg)>  warn 
)
inline

Load persistent values from a file.

The server automatically does this at startup, but this function provides a way to restore persistent values in the same format from a file at any time on either a client or a server.

Parameters
filenamefilename
warncallback function for warnings
Returns
error string, or nullptr if successful
const char * nt::LoadPersistent ( StringRef  filename,
std::function< void(size_t line, const char *msg)>  warn 
)

Load persistent values from a file.

The server automatically does this at startup, but this function provides a way to restore persistent values in the same format from a file at any time on either a client or a server.

Parameters
filenamefilename
warncallback function for warnings
Returns
error string, or nullptr if successful
const char * nt::LoadPersistent ( NT_Inst  inst,
const Twine filename,
std::function< void(size_t line, const char *msg)>  warn 
)

Parameters
instinstance handle
const char* NT_LoadEntries ( NT_Inst  inst,
const char *  filename,
const char *  prefix,
size_t  prefix_len,
void(*)(size_t line, const char *msg)  warn 
)

Load table values from a file.

The file format used is identical to that used for SavePersistent / LoadPersistent.

Parameters
instinstance handle
filenamefilename
prefixload only keys starting with this prefix
prefix_lenlength of prefix in bytes
warncallback function for warnings
Returns
error string, or nullptr if successful
const char* NT_LoadPersistent ( NT_Inst  inst,
const char *  filename,
void(*)(size_t line, const char *msg)  warn 
)

Load persistent values from a file.

The server automatically does this at startup, but this function provides a way to restore persistent values in the same format from a file at any time on either a client or a server.

Parameters
instinstance handle
filenamefilename
warncallback function for warnings
Returns
error string, or NULL if successful
const char* NT_SaveEntries ( NT_Inst  inst,
const char *  filename,
const char *  prefix,
size_t  prefix_len 
)

Save table values to a file.

The file format used is identical to that used for SavePersistent.

Parameters
instinstance handle
filenamefilename
prefixsave only keys starting with this prefix
prefix_lenlength of prefix in bytes
Returns
error string, or nullptr if successful
const char* NT_SavePersistent ( NT_Inst  inst,
const char *  filename 
)

Save persistent values to a file.

The server automatically does this, but this function provides a way to save persistent values in the same format to a file on either a client or a server.

Parameters
instinstance handle
filenamefilename
Returns
error string, or NULL if successful
const char * nt::NetworkTableInstance::SaveEntries ( const Twine filename,
const Twine prefix 
) const
inline

Save table values to a file.

The file format used is identical to that used for SavePersistent.

Parameters
filenamefilename
prefixsave only keys starting with this prefix
Returns
error string, or nullptr if successful
const char * nt::SaveEntries ( NT_Inst  inst,
const Twine filename,
const Twine prefix 
)

Save table values to a file.

The file format used is identical to that used for SavePersistent.

Parameters
instinstance handle
filenamefilename
prefixsave only keys starting with this prefix
Returns
error string, or nullptr if successful
const char * nt::NetworkTableInstance::SavePersistent ( const Twine filename) const
inline

Save persistent values to a file.

The server automatically does this, but this function provides a way to save persistent values in the same format to a file on either a client or a server.

Parameters
filenamefilename
Returns
error string, or nullptr if successful
const char * nt::SavePersistent ( StringRef  filename)

Save persistent values to a file.

The server automatically does this, but this function provides a way to save persistent values in the same format to a file on either a client or a server.

Parameters
filenamefilename
Returns
error string, or nullptr if successful
const char * nt::SavePersistent ( NT_Inst  inst,
const Twine filename 
)

Parameters
instinstance handle