package com.dev.fbs9100;
|
|
import java.io.PrintStream;
|
import java.nio.ByteBuffer;
|
import java.nio.ByteOrder;
|
|
public class FBS9100_DateTime
|
{
|
public int year = 0;
|
public int month = 1;
|
public int day = 1;
|
public int hour = 0;
|
public int minute = 0;
|
public int second = 0;
|
|
public FBS9100_DateTime clone()
|
{
|
FBS9100_DateTime obj = new FBS9100_DateTime();
|
|
obj.year = this.year;
|
obj.month = this.month;
|
obj.day = this.day;
|
obj.hour = this.hour;
|
obj.minute = this.minute;
|
obj.second = this.second;
|
|
return obj;
|
}
|
|
public void putByteBuffer(ByteBuffer bf)
|
{
|
this.year = FBS9100_ComBase.changeByteToInt(bf.get());
|
this.month = FBS9100_ComBase.changeByteToInt(bf.get());
|
this.day = FBS9100_ComBase.changeByteToInt(bf.get());
|
this.hour = FBS9100_ComBase.changeByteToInt(bf.get());
|
this.minute = FBS9100_ComBase.changeByteToInt(bf.get());
|
this.second = FBS9100_ComBase.changeByteToInt(bf.get());
|
}
|
|
public ByteBuffer getBytes()
|
{
|
ByteBuffer bytebuffer = ByteBuffer.allocate(12);
|
bytebuffer.order(ByteOrder.LITTLE_ENDIAN);
|
bytebuffer.put(FBS9100_ComBase.changeIntToByte(this.year));
|
bytebuffer.put(FBS9100_ComBase.changeIntToByte(this.month));
|
bytebuffer.put(FBS9100_ComBase.changeIntToByte(this.day));
|
bytebuffer.put(FBS9100_ComBase.changeIntToByte(this.hour));
|
bytebuffer.put(FBS9100_ComBase.changeIntToByte(this.minute));
|
bytebuffer.put(FBS9100_ComBase.changeIntToByte(this.second));
|
bytebuffer.flip();
|
System.out.println("date limit:" + bytebuffer.limit());
|
return bytebuffer;
|
}
|
|
public String toString()
|
{
|
return "FBS9100_DateTime [year=" + this.year + ", month=" + this.month + ", day=" + this.day + ", hour=" + this.hour + ", minute=" +
|
this.minute + ", second=" + this.second + "]";
|
}
|
}
|
|
/* Location: C:\Users\LiJun\Desktop\公司各种设备资料\9600显示模块相关文件\后台程序\2018-09-07\BattFBS9600XSP.jar
|
* Qualified Name: com.dev.fbs9100.FBS9100_DateTime
|
* JD-Core Version: 0.6.2
|
*/
|