File MIES_MiesUtilities_Uploads.ipf

This file holds MIES utility functions for data upload.

Functions

variable UploadCrashDumpsDaily()

Call UploadCrashDumps() if we haven’t called it since at least a day.

variable UploadLogFilesDaily()

Call UploadLogFiles() if we haven’t called it since at least a day.

variable UploadPingPeriodically()
static variable UploadPing()
variable GenerateJSONTemplateForUpload(string timeStamp = defaultValue)

Return JSON text with default entries for upload.

Caller is responsible for releasing JSON text.

variable UploadCrashDumps()

Convert the Igor Pro crash dumps and the report file to JSON and upload them.

Does nothing if none of these files exists.

The uploaded files are moved out of the way afterwards.

See tools/http-upload/upload-json-payload-v1.php for the JSON format description.

Returns:

1 if crash dumps had been uploaded, 0 otherwise

variable UploadLogFiles(variable verbose = defaultValue, variable firstDate = defaultValue, variable lastDate = defaultValue)

Upload the MIES and ZeroMQ logfiles.

Parameters:
  • verbose – [optional, defaults to true] Only in verbose mode the ticket ID is output to the history

  • firstDate – [optional, defaults to false] Allows to filter the logfiles to include entries within the given dates. Both firstDate and lastDate must be present for filtering. The timestamps are in seconds since Igor Pro epoch.

  • lastDate – [optional, defaults to false] See firstDate

static variable UploadLogFilesPrint(string str, variable verbose)

Variables

static const string EXPCONFIG_JSON_HWDEVBLOCK = "DAQHardwareDevices"
static const string UPLOAD_BLOCK_USERPING = "UserPing"