/// <summary> /// Constructor /// </summary> public GetStorageStatusForm() { InitializeComponent(); // Field initialization _req = new LJV7IF_GET_STRAGE_STATUS_REQ(); }
uint GetStorageProfileCount() { try { LJV7IF_GET_STRAGE_STATUS_REQ req = new LJV7IF_GET_STRAGE_STATUS_REQ() { dwRdArea = 0 }; // @Point // # dwReadArea is the target surface to read. // The target surface to read indicates where in the internal memory usage area to read. // # The method to use in specifying dwReadArea varies depending on how internal memory is allocated. // * Double buffer // 0 indicates the active surface, 1 indicates surface A, and 2 indicates surface B. // * Entire area (overwrite) // Fixed to 1 // * Entire area (do not overwrite) // After a setting modification, data is saved in surfaces 1, 2, 3, and so on in order, and 0 is set as the active surface. // # For details, see "9.2.9.2 Internal memory." LJV7IF_GET_STRAGE_STATUS_RSP rsp = new LJV7IF_GET_STRAGE_STATUS_RSP(); LJV7IF_STORAGE_INFO storageInfo = new LJV7IF_STORAGE_INFO(); uint profileCount = 0; rc = (Rc)NativeMethods.LJV7IF_GetStorageStatus(_currentDeviceId, ref req, ref rsp, ref storageInfo); CheckReturnValue(rc); profileCount = storageInfo.dwStorageCnt; return(profileCount); // @Point // # Terminology // * Base time … time expressed with 32 bits (<- the time when the setting was changed) // * Accumulated date and time … counter value that indicates the elapsed time, in units of 10 ms, from the base time // # The accumulated date and time are stored in the accumulated data. // # The accumulated time of read data is calculated as shown below. // Accumulated time = "base time (stBaseTime of LJV7IF_GET_STORAGE_RSP)" + "accumulated date and time × 10 ms" } catch (Exception) { throw; } }