The Impinj custom command Save_Settings saves the entire reader state to persistent storage and applies these settings upon Speedway Revolution reader power-on or reset. This includes settings from SET_READER_CONFIG in addition to any configured ROSpecs and AccessSpecs. The current state of ROSpecs and AccessSpecs are preserved with the one exception that an ‘Active’ ROSpec is saved in the ‘Inactive’ (but enabled) state.
An ROSpec with an ‘Immediate’ start trigger will be saved in the ‘Inactive’ state but will then run immediately upon power-on or reset. Similarly, a ROSpec with a GPI start trigger will run upon the first GPI transition after power-on or reset.
For AccessSpecs, the countdown value (if any) upon receiving this custom message is saved. No automatic update of the persistent configuration during reader operation is supported.
Note: You must Enable_Impinj_Extensions prior to running IMPINJ_SAVE_SETTINGS
Here is some sample code which enables Save_Settings:
private int SaveSettings() { MSG_IMPINJ_SAVE_SETTINGS iss_msg = new MSG_IMPINJ_SAVE_SETTINGS(); MSG_ERROR_MESSAGE msg_err; iss_msg.SaveConfiguration = true; // Send the custom message and wait for 5 seconds MSG_CUSTOM_MESSAGE cust_rsp = reader.CUSTOM_MESSAGE(iss_msg, out msg_err, 5000); MSG_IMPINJ_SAVE_SETTINGS_RESPONSE msg_rsp = cust_rsp as MSG_IMPINJ_SAVE_SETTINGS_RESPONSE; if (msg_rsp != null) { if (msg_rsp.LLRPStatus.StatusCode != ENUM_StatusCode.M_Success) { Console.WriteLine(msg_rsp.LLRPStatus.StatusCode.ToString()); reader.Close(); return -1; } } else if (msg_err != null) { Console.WriteLine(msg_err.ToString()); reader.Close(); return -1; } else { Console.WriteLine("Save Settings Command Timed out\n"); reader.Close(); return -1; } return 0; } private void Enable_Impinj_Extension() { MSG_IMPINJ_ENABLE_EXTENSIONS imp_msg = new MSG_IMPINJ_ENABLE_EXTENSIONS(); MSG_CUSTOM_MESSAGE cust_rsp = reader.CUSTOM_MESSAGE(imp_msg, out msg_err, 8000); MSG_IMPINJ_ENABLE_EXTENSIONS_RESPONSE msg_rsp = cust_rsp as MSG_IMPINJ_ENABLE_EXTENSIONS_RESPONSE; if (msg_rsp != null) { Console.WriteLine(msg_rsp.ToString()); } else if (msg_err != null) { Console.WriteLine(msg_err.ToString()); } else Console.WriteLine("Command timed out\n"); } private void Form1_Load(object sender, EventArgs e) { bool[] sb = new bool[] { true, true, false, false }; bool[] db = new bool[200]; sb.CopyTo(db, 0); }
Comments
Article is closed for comments.