OTAFirmwareUpdate
Public Member Functions | Static Public Attributes | List of all members
com.hobby.smart.bluetoothcomm.SystemStates Class Reference
Inheritance diagram for com.hobby.smart.bluetoothcomm.SystemStates:
Inheritance graph
[legend]
Collaboration diagram for com.hobby.smart.bluetoothcomm.SystemStates:
Collaboration graph
[legend]

Public Member Functions

void runStateMachine (int currentState)
 
void resetBinaryFileData ()
 
void sendHeader () throws IOException
 
void sendBinary () throws IOException
 
void setOutputStream (OutputStream mmOutStream)
 
void sendData (int data)
 
- Public Member Functions inherited from com.hobby.smart.bluetoothcomm.ReadHexFile
void readHex (String path) throws IOException
 
void setStartEndPICFlashAddress (long strt, long end)
 
int getFileStartIndex ()
 
int getFileEndIndex ()
 
long getStartAddress ()
 
int getTotalNumberOfPackets ()
 
void craeteBinData ()
 
byte [] getFileData ()
 

Static Public Attributes

static final int SYS_CONFIG_CMND = 0x01
 
static final int SYS_SEND_FIRMWARE_HEADER = 0x02
 
static final int SYS_FIRMWARE_HEADER_POS_ACK = 0x03
 
static final int SYS_FIRMWARE_HEADER_NEG_ACK = 0x04
 
static final int SYS_SEND_CHUNK = 0x05
 
static final int SYS_ADDRESS_RANGE_RCV = 0x06
 
static final int SYS_ADDRESS_RANGE_RQT = 0x07
 

Detailed Description

Created by Mallikarjun Tirlapur on 30-06-2016. SystemStates class inherits the properties of class ReadHexFile. The class handles various state of the system. Based on the command received from the PIC, Class responds with a command.

Member Function Documentation

◆ resetBinaryFileData()

void com.hobby.smart.bluetoothcomm.SystemStates.resetBinaryFileData ( )

Function initializes the variables filestartindex, fileEndIndex, binLength, fileData, fileStartAddress

Here is the call graph for this function:
Here is the caller graph for this function:

◆ runStateMachine()

void com.hobby.smart.bluetoothcomm.SystemStates.runStateMachine ( int  currentState)

Function executes different states of the system

Parameters
currentStatestate to be executed
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendBinary()

void com.hobby.smart.bluetoothcomm.SystemStates.sendBinary ( ) throws IOException

Function sends the binary data out in a packet, each of size 64 bytes

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendData()

void com.hobby.smart.bluetoothcomm.SystemStates.sendData ( int  data)

Function sends out the data byte

Parameters
datadata to be sent
Here is the caller graph for this function:

◆ sendHeader()

void com.hobby.smart.bluetoothcomm.SystemStates.sendHeader ( ) throws IOException

Function sends out the firmware header o the PIC

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setOutputStream()

void com.hobby.smart.bluetoothcomm.SystemStates.setOutputStream ( OutputStream  mmOutStream)

Function initializes an instance of OutputStream

Parameters
mmOutStreaminstance of OutputStream
Here is the caller graph for this function:

The documentation for this class was generated from the following file: