Innomatix Support / InnomatixSupport
Committer:
Innomatix
Date:
Thu Sep 29 15:06:36 2016 +0000
Revision:
6:2263210b33f7
v1.0.4a added missing files from previous import/publish

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Innomatix 6:2263210b33f7 1 /*******************************************************************
Innomatix 6:2263210b33f7 2 *
Innomatix 6:2263210b33f7 3 * File: updateclient_api.h
Innomatix 6:2263210b33f7 4 *
Innomatix 6:2263210b33f7 5 * Description: Coprocessor Update Client public API per specification document
Innomatix 6:2263210b33f7 6 *
Innomatix 6:2263210b33f7 7 * Copyright 2015 Innomatix, LLC., All Rights Reserved
Innomatix 6:2263210b33f7 8 *
Innomatix 6:2263210b33f7 9 * THIS DOCUMENT AND ITS CONTENTS ARE INTELLECTUAL PROPERTY
Innomatix 6:2263210b33f7 10 * OF INNOMATIX, LLC. ANY DUPLICATION IN PART OR WHOLE
Innomatix 6:2263210b33f7 11 * WITHOUT PRIOR WRITTEN CONSENT IS STRICTLY PROHIBITED.
Innomatix 6:2263210b33f7 12 *
Innomatix 6:2263210b33f7 13 *******************************************************************/
Innomatix 6:2263210b33f7 14 #ifndef _UPDATECLIENT_API_H
Innomatix 6:2263210b33f7 15 #define _UPDATECLIENT_API_H
Innomatix 6:2263210b33f7 16
Innomatix 6:2263210b33f7 17 typedef enum
Innomatix 6:2263210b33f7 18 {
Innomatix 6:2263210b33f7 19 statusSuccess = 0x00,
Innomatix 6:2263210b33f7 20 statusUpdateAvailable = 0x01,
Innomatix 6:2263210b33f7 21 statusNoUpdate = 0x02,
Innomatix 6:2263210b33f7 22 statusInvalidId = 0x03,
Innomatix 6:2263210b33f7 23 statusInvalidOffset = 0x04,
Innomatix 6:2263210b33f7 24 statusInvalidLength = 0x05,
Innomatix 6:2263210b33f7 25 statusInvalidChecksum = 0x06,
Innomatix 6:2263210b33f7 26 statusNameMismatch = 0x07,
Innomatix 6:2263210b33f7 27 statusDuplicateVersion = 0x08,
Innomatix 6:2263210b33f7 28 statusAbortUpdate = 0x09,
Innomatix 6:2263210b33f7 29 statusNoConnection = 0x0a
Innomatix 6:2263210b33f7 30 }UpdateStatus_e;
Innomatix 6:2263210b33f7 31 static const char *UpdateStatusNames[] =
Innomatix 6:2263210b33f7 32 {
Innomatix 6:2263210b33f7 33 "Success", "UpdateAvailable", "NoUpdate", "InvalidID", "InvalidOffset",
Innomatix 6:2263210b33f7 34 "InvalidLength", "InvalidChecksum", "NameMismatch", "DuplicateVersion",
Innomatix 6:2263210b33f7 35 "AbortUpdate", "NoConnection"
Innomatix 6:2263210b33f7 36 };
Innomatix 6:2263210b33f7 37 // A pointer so we dont get "unused variable" warning on the array
Innomatix 6:2263210b33f7 38 static const char *pUpdateStatusNames = UpdateStatusNames[0];
Innomatix 6:2263210b33f7 39
Innomatix 6:2263210b33f7 40
Innomatix 6:2263210b33f7 41
Innomatix 6:2263210b33f7 42 /*************************************************/
Innomatix 6:2263210b33f7 43
Innomatix 6:2263210b33f7 44
Innomatix 6:2263210b33f7 45 /**
Innomatix 6:2263210b33f7 46 This function initializes the API and sets up the Update Client.
Innomatix 6:2263210b33f7 47
Innomatix 6:2263210b33f7 48 Return Values:
Innomatix 6:2263210b33f7 49 • TRUE – client was able to setup the network and bind to the desired port
Innomatix 6:2263210b33f7 50 • FALSE – an error has occurred, the client is not functional
Innomatix 6:2263210b33f7 51 *********************************************************************/
Innomatix 6:2263210b33f7 52 UpdateStatus_e UpdateInit( const char *address, unsigned short port );
Innomatix 6:2263210b33f7 53
Innomatix 6:2263210b33f7 54
Innomatix 6:2263210b33f7 55
Innomatix 6:2263210b33f7 56 /**
Innomatix 6:2263210b33f7 57 Shutdown and clean up the Update Client
Innomatix 6:2263210b33f7 58 *********************************************************************/
Innomatix 6:2263210b33f7 59 void UpdateClose();
Innomatix 6:2263210b33f7 60
Innomatix 6:2263210b33f7 61
Innomatix 6:2263210b33f7 62
Innomatix 6:2263210b33f7 63 /**
Innomatix 6:2263210b33f7 64 Check for a pending update, compare versions to see if it should
Innomatix 6:2263210b33f7 65 be applied, receive, validate and apply the update. Report the
Innomatix 6:2263210b33f7 66 results to the client.
Innomatix 6:2263210b33f7 67
Innomatix 6:2263210b33f7 68 Return Values:
Innomatix 6:2263210b33f7 69 • TRUE - an update was performed successfully. Reboot is needed.
Innomatix 6:2263210b33f7 70 • FALSE - no update was pending, a pending update duplicates the
Innomatix 6:2263210b33f7 71 current application, a pending update was unsuccessful.
Innomatix 6:2263210b33f7 72 No further action is necessary regarding the update.
Innomatix 6:2263210b33f7 73 *********************************************************************/
Innomatix 6:2263210b33f7 74 UpdateStatus_e PerformUpdate( int timeout_msec );
Innomatix 6:2263210b33f7 75
Innomatix 6:2263210b33f7 76
Innomatix 6:2263210b33f7 77 #endif /* _UPDATECLIENT_API_H */
Innomatix 6:2263210b33f7 78