📄 onewirecontainer21.java
字号:
/** * Address of the control register. Used with the <code>getFlag</code> * and <code>setFlag</code> methods to set and * check flags indicating the Thermochron's status. * * @see #getFlag(int,byte,byte[]) * @see #getFlag(int,byte) * @see #setFlag(int,byte,boolean) * @see #setFlag(int,byte,boolean,byte[]) */ public static final int CONTROL_REGISTER = 0x20E; /** * Alarm frequency setting for the <code>setClockAlarm()</code> method. * If the DS1921 Thermocron alarm is enabled and is not alarming, * it will alarm on the next Real-Time Clock second. * * @see #setClockAlarm(int,int,int,int,int,byte[]) */ public static final byte ONCE_PER_SECOND = ( byte ) 0x1F; /** * Alarm frequency setting for the <code>setClockAlarm()</code> method. * If the DS1921 Thermocron alarm is enabled and is not alarming, * it will alarm the next time the Real-Time Clock's 'second' value is * equal to the Alarm Clock's 'second' value. * * @see #setClockAlarm(int,int,int,int,int,byte[]) */ public static final byte ONCE_PER_MINUTE = ( byte ) 0x17; /** * Alarm frequency setting for the <code>setClockAlarm()</code> method. * If the DS1921 Thermocron alarm is enabled and is not alarming, * it will alarm the next time the Real-Time Clock's 'second' and 'minute' values are * equal to the Alarm Clock's 'second' and 'minute' values. * * @see #setClockAlarm(int,int,int,int,int,byte[]) */ public static final byte ONCE_PER_HOUR = ( byte ) 0x13; /** * Alarm frequency setting for the <code>setClockAlarm()</code> method. * If the DS1921 Thermocron alarm is enabled and is not alarming, * it will alarm the next time the Real-Time Clock's 'second', 'minute', and 'hour' values are * equal to the Alarm Clock's 'second', 'minute', and 'hour' values. * * @see #setClockAlarm(int,int,int,int,int,byte[]) */ public static final byte ONCE_PER_DAY = ( byte ) 0x11; /** * Alarm frequency setting for the <code>setClockAlarm()</code> method. * If the DS1921 Thermocron alarm is enabled and is not alarming, * it will alarm the next time the Real-Time Clock's 'second', 'minute', 'hour', and 'day of week' values are * equal to the Alarm Clock's 'second', 'minute', 'hour', and 'day of week' values * * @see #setClockAlarm(int,int,int,int,int,byte[]) */ public static final byte ONCE_PER_WEEK = ( byte ) 0x10; /** * Low temperature alarm value for the methods <code>getAlarmStatus()</code>, * <code>getAlarmHistory()</code>, and <code>setTemperatureAlarm()</code>. * * @see #getAlarmStatus(byte,byte[]) * @see #getAlarmHistory(byte) * @see #setTemperatureAlarm(int,double,byte[]) */ public static final byte TEMPERATURE_LOW_ALARM = 4; /** * High temperature alarm value for the methods <code>getAlarmStatus()</code>, * <code>getAlarmHistory()</code>, and <code>setTemperatureAlarm()</code>. * * @see #getAlarmStatus(byte,byte[]) * @see #getAlarmHistory(byte) * @see #setTemperatureAlarm(int,double,byte[]) */ public static final byte TEMPERATURE_HIGH_ALARM = 2; /** * Clock alarm value for the methods <code>getAlarmStatus()</code> * and <code>isClockAlarming()</code>. * * @see #getAlarmStatus(byte,byte[]) * @see #isClockAlarming(byte[]) */ public static final byte TIMER_ALARM = 1; /** * CONTROL REGISTER FLAG: When enabled, the device will respond to conditional * search command if a timer alarm has occurred. * * @see #getFlag(int,byte,byte[]) * @see #getFlag(int,byte) * @see #setFlag(int,byte,boolean) * @see #setFlag(int,byte,boolean,byte[]) */ public static final byte TIMER_ALARM_SEARCH_FLAG = 1; /** * CONTROL REGISTER FLAG: When enabled, the device will respond to conditional * search command if the temperature has reached the high temperature threshold. * * @see #getFlag(int,byte,byte[]) * @see #getFlag(int,byte) * @see #setFlag(int,byte,boolean) * @see #setFlag(int,byte,boolean,byte[]) */ public static final byte TEMP_HIGH_SEARCH_FLAG = 2; /** * CONTROL REGISTER FLAG: When enabled, the device will respond to conditional * search command if the temperature has reached the low temperature threshold. * * @see #getFlag(int,byte,byte[]) * @see #getFlag(int,byte) * @see #setFlag(int,byte,boolean) * @see #setFlag(int,byte,boolean,byte[]) */ public static final byte TEMP_LOW_SEARCH_FLAG = 4; /** * CONTROL REGISTER FLAG: When enabled, the device will begin overwriting the earlier * temperature measurements when the temperature log memory becomes full. * * @see #getFlag(int,byte,byte[]) * @see #getFlag(int,byte) * @see #setFlag(int,byte,boolean) * @see #setFlag(int,byte,boolean,byte[]) */ public static final byte ROLLOVER_ENABLE_FLAG = 8; /** * CONTROL REGISTER FLAG: When DISABLED, the mission will start as soon as the * sample rate is written. * * @see #getFlag(int,byte,byte[]) * @see #getFlag(int,byte) * @see #setFlag(int,byte,boolean) * @see #setFlag(int,byte,boolean,byte[]) */ public static final byte MISSION_ENABLE_FLAG = 16; /** * CONTROL REGISTER FLAG: Must be enabled to allow a clear memory * function. Must be set immediately before the command is issued. * * @see #clearMemory() * @see #getFlag(int,byte,byte[]) * @see #getFlag(int,byte) * @see #setFlag(int,byte,boolean) * @see #setFlag(int,byte,boolean,byte[]) */ public static final byte MEMORY_CLEAR_ENABLE_FLAG = 64; /** * CONTROL REGISTER FLAG: When DISABLED, the real time clock will start * working. Must be disabled for normal operation. * * @see #getFlag(int,byte,byte[]) * @see #getFlag(int,byte) * @see #setFlag(int,byte,boolean) * @see #setFlag(int,byte,boolean,byte[]) */ public static final byte OSCILLATOR_ENABLE_FLAG = ( byte ) 128; /** * STATUS REGISTER FLAG: Will read back true when a clock alarm has occurred. * * @see #getFlag(int,byte,byte[]) * @see #getFlag(int,byte) */ public static final byte TIMER_ALARM_FLAG = 1; /** * STATUS REGISTER FLAG: Will read back true when the temperature during a mission * reaches or exceeds the temperature high threshold. * * @see #getFlag(int,byte,byte[]) * @see #getFlag(int,byte) */ public static final byte TEMPERATURE_HIGH_FLAG = 2; /** * STATUS REGISTER FLAG: Will read back true when a temperature equal to or below * the low temperature threshold was detected on a mission. * * @see #getFlag(int,byte,byte[]) * @see #getFlag(int,byte) */ public static final byte TEMPERATURE_LOW_FLAG = 4; /** * STATUS REGISTER FLAG: Will read back true when a mission temperature conversion * is in progress * * @see #getFlag(int,byte,byte[]) * @see #getFlag(int,byte) */ public static final byte SAMPLE_IN_PROGRESS_FLAG = 16; /** * STATUS REGISTER FLAG: Will read back true when a mission is in progress. * * @see #getFlag(int,byte,byte[]) * @see #getFlag(int,byte) */ public static final byte MISSION_IN_PROGRESS_FLAG = 32; /** * STATUS REGISTER FLAG: Will read back true if the memory has been cleared. * * @see #getFlag(int,byte,byte[]) * @see #getFlag(int,byte) */ public static final byte MEMORY_CLEARED_FLAG = 64; /** * STATUS REGISTER FLAG: Will read back true if a temperature conversion * of any kind is in progress. * * @see #getFlag(int,byte,byte[]) * @see #getFlag(int,byte) */ public static final byte TEMP_CORE_BUSY_FLAG = ( byte ) 128; /** * Creates a new <code>OneWireContainer</code> for communication with a DS1921 Thermocron iButton. * Note that the method <code>setupContainer(DSPortAdapter,byte[])</code> * must be called to set the correct <code>DSPortAdapter</code> device address. * * @see com.dalsemi.onewire.container.OneWireContainer#setupContainer(com.dalsemi.onewire.adapter.DSPortAdapter,byte[]) setupContainer(DSPortAdapter,byte[]) * @see #OneWireContainer21(com.dalsemi.onewire.adapter.DSPortAdapter,byte[]) OneWireContainer21(DSPortAdapter,byte[]) * @see #OneWireContainer21(com.dalsemi.onewire.adapter.DSPortAdapter,long) OneWireContainer21(DSPortAdapter,long) * @see #OneWireContainer21(com.dalsemi.onewire.adapter.DSPortAdapter,java.lang.String) OneWireContainer21(DSPortAdapter,String) */ public OneWireContainer21 () { super(); // initialize the memory banks initMem(); } /** * Creates a new <code>OneWireContainer</code> for communication with a DS1921 Thermocron iButton. * * @param sourceAdapter adapter object required to communicate with * this iButton * @param newAddress address of this DS1921 * * @see #OneWireContainer21() * @see #OneWireContainer21(com.dalsemi.onewire.adapter.DSPortAdapter,long) OneWireContainer21(DSPortAdapter,long) * @see #OneWireContainer21(com.dalsemi.onewire.adapter.DSPortAdapter,java.lang.String) OneWireContainer21(DSPortAdapter,String) */ public OneWireContainer21 (DSPortAdapter sourceAdapter, byte[] newAddress) { super(sourceAdapter, newAddress); // initialize the memory banks initMem(); } /** * Creates a new <code>OneWireContainer</code> for communication with a DS1921 Thermocron iButton. * * @param sourceAdapter adapter object required to communicate with * this iButton * @param newAddress address of this DS1921 * * @see #OneWireContainer21() * @see #OneWireContainer21(com.dalsemi.onewire.adapter.DSPortAdapter,byte[]) OneWireContainer21(DSPortAdapter,byte[]) * @see #OneWireContainer21(com.dalsemi.onewire.adapter.DSPortAdapter,java.lang.String) OneWireContainer21(DSPortAdapter,String) */ public OneWireContainer21 (DSPortAdapter sourceAdapter, long newAddress) { super(sourceAdapter, newAddress); // initialize the memory banks initMem(); } /** * Creates a new <code>OneWireContainer</code> for communication with a DS1921 Thermocron iButton. * * @param sourceAdapter adapter object required to communicate with * this iButton * @param newAddress address of this DS1921 * * @see #OneWireContainer21() * @see #OneWireContainer21(com.dalsemi.onewire.adapter.DSPortAdapter,long) OneWireContainer21(DSPortAdapter,long) * @see #OneWireContainer21(com.dalsemi.onewire.adapter.DSPortAdapter,java.lang.String) OneWireContainer21(DSPortAdapter,String) */ public OneWireContainer21 (DSPortAdapter sourceAdapter, String newAddress) { super(sourceAdapter, newAddress); // initialize the memory banks initMem(); } /** * Provides this container with the adapter object used to access this device and * the address of the iButton or 1-Wire device. * * @param sourceAdapter adapter object required to communicate with * this iButton * @param newAddress address of this 1-Wire device * @see com.dalsemi.onewire.utils.Address */ public void setupContainer(DSPortAdapter sourceAdapter, byte[] newAddress) { super.setupContainer(sourceAdapter, newAddress); setThermochronVariables(); } /** * Provides this container with the adapter object used to access this device and * the address of the iButton or 1-Wire device. * * @param sourceAdapter adapter object required to communicate with * this iButton * @param newAddress address of this 1-Wire device * @see com.dalsemi.onewire.utils.Address */ public void setupContainer(DSPortAdapter sourceAdapter, long newAddress) { super.setupContainer(sourceAdapter, newAddress); setThermochronVariables(); } /** * Provides this container with the adapter object used to access this device and * the address of the iButton or 1-Wire device. * * @param sourceAdapter adapter object required to communicate with * this iButton * @param newAddress address of this 1-Wire device * @see com.dalsemi.onewire.utils.Address */ public void setupContainer(DSPortAdapter sourceAdapter, java.lang.String newAddress) { super.setupContainer(sourceAdapter, newAddress); setThermochronVariables(); }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -