wiki:Docs/Prog/Manual/Foundation/ApplicationModeStartup

Version 4 (modified by Michael Grooms, 14 years ago) ( diff )

--

Table of Contents

  1. 825 Programmer's Manual
  2. Application Libraries
  3. Database Libraries
    1. MySQL Client
    1. About SQLite
    2. SQLite Library (libsql)
      1. Using libsql
    3. SqlBuilder Class
    4. SQLite++ Class
    5. Using SQLite++ with SqlBuilder
  4. Standard 825 Library with Application class (lib825)
    1. Utility Functions
  5. Standard 825 Library with EVENT features (lib825ev)
  6. Communications Functions
  7. CComm
    1. Member Functions
      1. Send
        1. Description
        2. Parameters
        3. Return value
      2. Process
        1. Description
      3. AddRcvEvent
        1. Parameters
        2. Description
        3. Example
      4. SetDebugRawRead
        1. Parameters
        2. Description
        3. Example
    2. See Also
  8. CCommClient
      1. Constructor
        1. Parameters
      2. Member Functions
        1. Description
        2. Example
    1. See Also
  9. CCommSerial
    1. Constructors
        1. Parameters
        2. Remarks
        3. Examples
        4. Example
    2. Member Functions
      1. SetPort
        1. Parameters
        2. Return Value
      2. Open
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      3. Close
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      4. SetParameters
        1. Parameters
        2. Return Value
        3. Remarks
        4. Examples
      5. IsReady
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      6. SetRTS
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
    3. See Also
  10. CCommServer
      1. Constructor
      2. Member Functions
        1. Description
        2. Example
    1. See Also
  11. Analog Output (DAC Digital to Analog Conversion) Functions
    1. Example - Application manually setting DAC output voltage
  12. GetDAC
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  13. GetDACPercent
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  14. GetDACRangeFromIndex
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  15. GetIndexFromDACRange
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  16. SetDACFloat
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  17. SetDACOutputRange
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  18. SetDACPercent
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  19. SetDACReg
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  20. SetDACTrackGrossNet
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  21. SetDACTrackScale
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  22. StopDACTrackScale
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  23. Debug Functions
  24. DEBUG_MSG
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  25. DEBUG_SHOWDATA
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  26. Display Functions
  27. CBitmap
    1. Constructors
        1. Parameters
        2. Examples
    2. Member Functions
      1. LoadBitmp
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      2. DeleteBitmap
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      3. Draw
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      4. GetWidth
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      5. GetHeight
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      6. GetColorCnt
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      7. GetColorsAdded
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      8. GetError
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      9. ReclaimColors
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
  28. CFont 825gen2
    1. Constructors
        1. Parameters
        2. Examples
    2. Member Functions
      1. CFreetypeFont& GetFont(int zoom)
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      2. Load
        1. Parameters
        2. Return Value
      3. SetPixelSize
        1. Parameters
        2. Return Value
      4. GetStrWidth
        1. Parameters
        2. Return Value
      5. DisplayText
        1. Parameters
        2. Return Value
  29. CImage 825gen2
    1. Constructors
        1. Parameters
        2. Examples
    2. Member Functions
      1. LoadImage
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      2. Draw
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
  30. ClearLCD
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  31. DisplayStr DEPRECATED - Replace with DisplayText
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  32. DisplayText
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  33. GetX
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  34. GetY
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  35. InitLCD
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  36. IsFontLoaded
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  37. LocateLCD
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  38. PrintLCD
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  39. PrintLCDbutton
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  40. PrintLCDfont2
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  41. ReadFont
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  42. SetBkColor
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  43. SetCurColor
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  44. File Functions
  45. CFile
    1. Constructors
        1. Parameters
        2. Examples
    2. Member Functions
      1. Open
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      2. Close
        1. Parameters
        2. Retrun Value
        3. Remarks
        4. Example
      3. SetSerial
        1. Parameters
        2. Return Value
        3. Remarks
        4. Examples
      4. ReadLine
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      5. DeleteFile
        1. Parameters
        2. Return value
        3. Remarks
        4. Examples
      6. IsOpen
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      7. IsReady
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      8. SetRTS
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      9. GetFile
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      10. Print
        1. Parameters
        2. Return Value
        3. Remarks
        4. Examples
      11. SetNonBlocking
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      12. Read
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      13. Write
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      14. GetBytesRead
        1. Parameters
        2. Return Value
        3. Example
      15. GetbytesWritten
        1. Parameters
        2. Return Value
        3. Example
      16. Seek
  46. FileCopy
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  47. FindChromiumPath 825gen2
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  48. FindFlashDrive 825gen2
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  49. GetFilesInPathWithExtension
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  50. IsMounted
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  51. MakeDirIfNotExists
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  52. MountDirectory 825gen2
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  53. UnmountDirectory 825gen2
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  54. Form Functions
  55. CForm
    1. Methods
  56. CFormRect 825gen2
  57. EVENT
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  58. EVENT_FLAG_SHOW
    1. Examples
    2. See Also
  59. EVENT_SHOW_BTN_CONTENT
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  60. EnableItem
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
      1. See Also
  61. ExitWithCode
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  62. FORM_ADD_BUTTON
    1. Parameters
    2. Return Value
    3. Remarks
      1. Button Styles
    4. Examples
    5. See Also
  63. FORM_ADD_BUTTON2 825gen2
    1. Parameters
    2. Return Value
    3. Remarks
      1. Button Styles
    4. Examples
    5. See Also
  64. FORM_ADD_INPUT
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  65. FORM_ADD_INPUT2 825gen2
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  66. FORM_DONE_ESCAPE
    1. Example
      1. See Also
  67. FORM_DONE_EVENT_EXTERNAL
    1. Example
      1. See Also
  68. FORM_DONE_LEFT_ARROW
    1. Example
      1. See Also
  69. FORM_HIDE
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  70. FORM_INIT
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  71. FORM_IS_UPDATED
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  72. FORM_RUN
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  73. FORM_SHOW
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  74. FindName
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
  75. GetCurrentItemIndex
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
  76. GetExitCode
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  77. GetItem
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
  78. !GetItemByIDVal
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
  79. GetItemCount
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
  80. GetItemIndex
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
  81. HideItem
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
      1. See Also
  82. IN_EVENT_HIDE_FORM
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  83. IN_EVENT_SHOW_FORM
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  84. IN_EVENT_WRITE_DATA
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  85. IsChanged
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  86. SetInputFont
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  87. SetKeyEvent
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  88. ShowItem
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
      1. See Also
  89. WriteData
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
    6. See Also
  90. Input / Output (Digital I/O) Functions
  91. GetInput
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  92. GetInputMask
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  93. GetOutput
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  94. SetDIOCounter
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  95. SetOutput
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  96. SetOutputMask
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  97. StartDIOPulse
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  98. StartRepeatIO Deprecated
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  99. StopDIOPulse
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  100. StopRepeatIO Deprecated
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  101. Keypad/Sound Functions
  102. ClearKeyBuffer
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  103. KeyPadInsertKey
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  104. KeyPadSetUSBEvent
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  105. OpenBeeper
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  106. PlayNotes
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  107. WaitKeypress
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  108. Process Functions
  109. GetProcessID
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  110. GetProcessIDExcludeSelf
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  111. KillProcess
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  112. ResetPrevGrossWt
  113. ResetPrevNetWt
  114. ResetPrevTareWt
  115. test
  116. String Functions
  117. FloatToStr
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  118. IntToStr
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  119. StrFmt
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  120. StrFmtLen
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  121. StrToFloat
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  122. StrToInt
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  123. StrTrimLeft
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  124. StrTrimRight
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  125. Ticket Functions
  126. CTktFlds
    1. Constructor
        1. Parameters
        2. Examples
    2. Member Functions
      1. Clear
        1. Parameters
        2. Return Value
        3. Remarks
        4. Examples
      2. Set
        1. Parameters
        2. Retrun Value
        3. Remarks
        4. Example
      3. SetEvent
        1. Parameters
        2. Retrun Value
        3. Remarks
        4. Example
      4. PrintTkt
        1. Parameters
        2. Return Value
        3. Remarks
        4. Examples
  127. PrintTkt
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  128. Time and Date Functions
  129. CMillisecondTimer
    1. Constructors
        1. Parameters
        2. Example
    2. Member Functions
      1. Set
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      2. Clear
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
  130. CSleep
    1. Constructor
        1. Parameters
        2. Example
    2. Member Functions
      1. SetTime
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      2. Pause
        1. Parameters
        2. Retrun Value
        3. Remarks
        4. Example
  131. CTimer
    1. Constructors
        1. Parameters
        2. Example
    2. Member Functions
      1. Set
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
      2. Clear
        1. Parameters
        2. Return Value
        3. Remarks
        4. Example
  132. DoSleep
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  133. GetDateStr
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  134. GetLinuxTime
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  135. GetTimeStr
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  136. IsTimeChanged
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  137. ResetPrevTime
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  138. SleepMilliseconds
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  139. SleepSeconds
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  140. Utility Functions
  141. GetKernelVer
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  142. GetKernelVerStr
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  143. GetLoaderVer
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  144. GetLoaderVerStr
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  145. GetMemFree
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  146. GetMnBdVer
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  147. GetMnBdVerStr
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  148. Weighing Functions
    1. Minimal Weight Indicator Sample Program
  149. CheckWIM * DEPRECATED - New apps should use MnBdSetWIM *
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  150. DLCRepeatMultiIncludeCellWts
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  151. FormatGrossWt
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  152. FormatNetWt
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  153. FormatTareWt
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  154. FormatWt
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  155. GetBelowZero
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  156. GetCapacity
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  157. GetCenterZero
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  158. GetCurUnitsLabel
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  159. GetDecimal
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  160. GetGrossWt
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  161. GetInterval
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  162. GetMotion
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  163. GetNetWt
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  164. GetNumScales
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  165. GetOverCap
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  166. GetProcessScale
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  167. GetSecUnitsLabel
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  168. GetTareWt
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  169. GetUnitsLabel
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  170. GetWtError
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  171. IsGrossWtChanged
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  172. IsNetWtChanged
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  173. IsTareWtChanged
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  174. IsWtStatusChanged
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  175. IsWtUnitsChanged
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  176. MnBdClearEvent
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  177. MnBdClose
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  178. MnBdGetErr
  179. MnBdGetErrMsg
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  180. MnBdGetErrMsgStr
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  181. MnBdOpen
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  182. MnBdProcess * DEPRECATED - New apps should use StartRepeatMulti *
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  183. MnBdRead
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  184. MnBdRequest
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  185. MnBdSetEvent
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  186. MnBdSetWIM
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  187. MnBdShutdown
  188. MnBdStartup
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  189. RequestWt * DEPRECATED - New apps should use StartRepeatMulti *
    1. Parameters
    2. Return Value
    3. Remarks
    4. See Also
  190. ResetPrevGrossWt
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  191. ResetPrevNetWt
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  192. ResetPrevTareWt
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  193. ResetPrevWtStatus
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  194. ResetPrevWtUnits
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  195. SetTareCurrent
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  196. SetTareValue
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  197. SetWIM * DEPRECATED - New apps should use MnBdSetWIM *
    1. Parameters
    2. Return Value
    3. Remarks
    4. Example
    5. See Also
  198. StartRepeatMulti
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  199. StartRepeatWt * DEPRECATED - New apps should use StartRepeatMulti *
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  200. StopRepeatMulti
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  201. StopRepeatWt * DEPRECATED - New apps should use StopRepeatMulti *
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  202. ZeroScale
    1. Parameters
    2. Return Value
    3. Remarks
    4. Examples
    5. See Also
  203. Development Environment
  204. Application Signing
  205. Debugging
    1. GDB
  206. Setup for Software Development
      1. About
      2. Features of the Cardinal 825 Programming Environment
      3. Required Files
      4. Installing the Environment
      5. Starting the Environment
      6. Using the Environment
        1. Welcome Screen
        2. Project Explorer
        3. Task Repositories
        4. Task Queries
        5. Subversion
        6. Hyper-V
  207. Version Control
    1. Subversion
      1. About Subversion
      2. Subclipse for Eclipse
        1. Installing Subclipse
          1. Importing Projects Using Subclipse
  208. Device Support
  209. Device Drivers
    1. Overview
  210. Beeper
  211. DIO
    1. Digital I/O
    2. DIO Events
      1. About
      2. The Code
    3. DIO Counting
      1. Description
      2. Example
  212. Display
    1. Fonts
  213. Network
    1. Network File System (NFS)
    2. Weight Server -- Network Access
    3. Network Programming
      1. 825 TCP/IP Server Example
      2. 825 TCP/IP Client Example
    4. Send E-mail from 825
    5. FTP
    6. Batch file to upload a file from a PC to an 825 using the 825 web …
    7. Batch file to download a file from an 825 to a PC using the 825 web …
  214. Serial Ports
    1. Using Serial Ports for Linux Shell
    2. Generic Serial Port Use
  215. USB Support
    1. 825 USB A Ports (2)
      1. USB Mass Storage
        1. Accessing USB storage from a program
      2. USB Keyboards
      3. USB Printing
        1. Compatible USB Printers
      4. USB Hubs
    2. 825 USB B Port (1)
      1. USB to PC communications
  216. Weighing
    1. Get Weight
      1. Command prompt testing
      2. Access the weight data from a program
  217. Foundation
  218. Application Mode Startup
    1. Introduction
    2. Modules
    3. Mounts
    4. Appmenu Shell Script
    5. Appmenu Config File
    6. Support Applications
  219. Shell operations - Linux / Windows command line Reference
  220. Mainboard Protocol
  221. Environment Setup
    1. About
    2. Features of the Cardinal 825 Programming Environment
    3. Required Files
    4. Installing the Environment
    5. Starting the Environment
    6. Using the Environment
      1. Welcome Screen
      2. Project Explorer
      3. Task Repositories
      4. Task Queries
      5. Subversion

Application Mode Startup

Introduction

When an 825 weight indicator is first powered up the display will show a brief display test and then version and status display.

  1. Application Mode
  1. Standard Indicator
  1. Setup

When "1. Application Mode" is selected the uClinux operating system will start to allow applications to run.

Linux uses a startup script file /etc/rc.d/rc.local to provide startup instructions. This script file is a text file containing a sequence of commands. This is similar to the AUTOEXEC.BAT file in an MS-DOS environment.

To learn more of the details of the operating system have a serial cable connected to COM1 of the 825 and to a serial port on a PC running a terminal program such as PuTTY or Minicom. Make sure the 825 setup baud rate matches the terminal program settings. Also make sure the 825 "Update Software Menu" "Setting" does not have the "console=null" statement which will prevent serial port access to the console. After this setup is accomplished uClinux shell commands may be typed in the terminal program and responses will appear in the terimal program.

Type:

# cat /etc/rc.d/rc.local

Output:

Error: Failed to load processor Lineno
No macro or processor named 'Lineno' found

Top

Modules

The modprobe lines install device drivers that are installed as loadable modules.

  • mnbd-comm module for dma uart communications with mainboard
  • i2c-mcf module for coldfire i2c communications – loading this also causes i2c-core to be loaded
  • max734x module for keypad/beeper access
  • isp1520 module for i2c initialization of isp1520 usb hub

You can see what modules are loaded by typing:

# cat /proc/modules

'''or'''

# lsmod

Modules may be unloaded by typing:

# rmmod <module>

such as rmmod max734x. Top

Mounts

The script also mounts the 64M NAND flash as /mnt/nand and changes to the folder /mnt/nand/indicator. You can view the current mount points by typing:

# cat /proc/mounts

Before turning off the indicator it is best to un-mount the NAND and NFS if it is mounted.

# umount /mnt/nand
# umount /mnt/nfs

Top

Appmenu Shell Script

Finally the script executes another shell script on the nand flash.

# sh appmenu.sh &

The command “sh” means to call a shell script. The “appmenu.sh” is the filename of the script, and the “&” ampersand character indicates that the script runs in a separate thread from the terminal. This allows for typing commands from the terminal while the script is running.

To view this script type:

# cd /mnt/nand/bin
# cat appmenu.sh

Output:

Error: Failed to load processor Lineno
No macro or processor named 'Lineno' found

This script has a couple of comment lines at the beginning starting with the “#” character. It then has a while,do – done loop. The colon “:” after the while indicates an always true condition to continue the loop. The first statement within the while-do is “/mnt/nand/bin/appmenu”. This causes the script to execute a program file called “appmenu” just as if it were typed from the command line. The “/mnt/nand/bin/” specifies the bin or binary directory the program is located in. The “appmenu” program displays a menu on the 825 indicator. The menu items presented are determined by a configuration file appmenu.cfg located in the /mnt/nand/cfg directory. Alternatively, a path and filename for the config file may be specified as a command parameter for the appmenu program, such as:

“/mnt/nand/bin/appmenu /mnt/nand/cfg/appmenu2.cfg”

Top

Appmenu Config File

Any one item in the configuration file may end in “~XX” (where XX is a number of seconds for the item to be automatically selected).

For example, type:

# cat /mnt/nand/cfg/appmenu.cfg

Output:

Error: Failed to load processor Lineno
No macro or processor named 'Lineno' found

If the first character of a line is a asterisk “*” the next two digits specify the return value when the item is selected. If the first character of a line is a pound sign “#” the item is disabled and will not appear when the menu is displayed.

Starting with version 1.19 the Configuration Utility “touchcal” has an option “Configure Menu” which allows the menu to be customized. This feature makes use of the “*” and “#” symbols to enable or disable items on the menu. Also to facilitate this feature instead of having specific items numbers such as “1.”, “2.”, etc… in the configuration file the item numbers are replaced with “%d”. The “appmenu” program will fill in the appropriate item number when “%d” is encountered.

This configuration will cause a countdown to appear on the menu next to the “Truck Storage” selection. Another menu choice may be selected by pressing the appropriate number first. Using an arrow key to change the selection will stop the countdown so the menu will stay indefinitely. When the countdown is complete the menu item will be selected automatically. A file /tmp/cntdn is written as a flag so the auto start countdown only occurs on the first power up of the indicator. (/tmp is a ramdisk directory - it does not maintain its contents after reset)

If the configuration file specifies seven items or less the application menu is shown on one page. If more items are specified the six items are shown per page with “Prev” and “Next” buttons shown to select pages. Up to five pages are possible.

When any of these choices is selected the “appmenu” program terminates back to the script with a return value corresponding to the menu item selected. (The return value is based only on the line count of the appmenu.cfg file, not numbers specified in the configuration file).

The following lines check the return value from the appmenu program:

Error: Failed to load processor Lineno
No macro or processor named 'Lineno' found

If the value is equal to 4 the program “ids” is called. If the value is 5 the program “dfc” is called. If the value is 6 the program “chkwgh” is called. If the value is 7 the script will change directory to /mnt/nand/apps/788IDS and call the program “cardbas” to run the 788 program “788IDS.77X”. When finished the script will change the current directory back to /mnt/nand/bin.

Error: Failed to load processor Lineno
No macro or processor named 'Lineno' found

If the value is equal to 12 the configuration program “touchcal” is called.

Error: Failed to load processor Lineno
No macro or processor named 'Lineno' found

If the value is equal to 13 the script calls another script “filemgr.sh” to open the file manager.

Error: Failed to load processor Lineno
No macro or processor named 'Lineno' found

Note that this script contains another while-do-done loop and launches the file manager within the loop. If certain file types are selected such as an S19 file to update firmware, or a bmp file to display the file manager creates a another script /tmp/filemgr_cmd.sh and returns with an exit code 1. In this case the filemgr.sh script calls the filemgr_cmd.sh script and when complete the while loop will cause the filemgr to start again. If the file manager is exited the return value is zero and exit statement is executed so control will return to the appmenu script.

Error: Failed to load processor Lineno
No macro or processor named 'Lineno' found

If the value is equal to 14 the script calls the image viewer program to display a slide show. Note that a parameter is passed to the image viewer program containing the path to a configuration file slideshow.cfg:

Error: Failed to load processor Lineno
No macro or processor named 'Lineno' found

The image viewer program will display these images sequentially and repeat until the escape key is pressed. Control will then return to the appmenu script.

If the value is from 21 to 38 a custom application script is executed. Refer to the “Configuration Utility documentation for information about configuring custom menu items.

If the value is 99 the script will call the “reboot” function with the “&” character so that it runs in a different thread. The appmenu script will then exit. This is necessary so the reboot function can unmount the NAND. The reboot function will kill the wtsvr process if it is running and unmount the NAND then do a software restart of the OPI board microprocessor. The boot loader startup display will return. Note that this does not reboot the mainboard.

The “esac” statement is needed to end the “case” conditions. (esac is case spelled backwards).

When either the “touchcal” or “indicator” program exits, control will return to the script and to the statement after “esac”. This is the “done” statement which is the bottom of the while-do loop. The script execution will immediately return to the statement following “do” and display the menu again.

If you want to stop the “indicator”, “touchcal”, or “appmenu” program you should use the “ps” command and find the <PID> process ID of the script “sh appmenu.sh” first. Use the “kill” command to stop the script before stopping the program. Otherwise, the script may immediately restart the program.

Top

Support Applications

/mnt/nand/bin/appmenu –

The appmenu program displays the application menu.

/mnt/nand/bin/loadrec – This application is normally automatically called, so a typical user need not know these details. When an “.S19” or “.bin” flash update is selected in the file manager a script file is created which calls the “loadsrec” program with the appropriate filename and options to perform the flash. It may be useful at times to call “loadsrec” manually, or to create special shell scripts which call “loadsrec”.

The command line must be specified such as:

loadsrec filename type prompt delaytime

filename - path and filename of S19 file

type – O=OPI bootloader M=Mainboard X=Other such as image.bin

prompt – (Optional parameter – default prompt is enabled) P=prompt (yes/no) after showing version information N=no prompt (feature added starting with loadsrec 1.07, previous versions did not prompt) W=no prompt only update if newer version.

delaytime – (Optional parameter – default 50ms) delay in milliseconds between writing records. Should normally not be changed.

A shell script may be written to perform an update of both the OPI board boot loader and the mainboard flash.

echo "Updating flash
r" > /dev/carddsp

/mnt/nand/bin/loadsrec "/mnt/nfs/Demo1 M5213EVB Boot Loader.elf.S19" M N

/mnt/nand/bin/loadsrec /mnt/nfs/m5329evb_flash.S19 O N

echo " Done " > /dev/carddsp

/mnt/nand/bin/imageview

The imageview program will display BMP bitmap images. The images to display must already be sized as 640 x 480, and 24 bit per pixel format.

The command line must be specified such as:

imageview filename

If the filename is a BMP file the file will be displayed. If the filename is a .cfg file it will be interpreted as a text file containing the filenames of BMP files to display as a slideshow in a continuous loop.

/mnt/nand/bin/filemanage –

The filemanage program is the file manager.

The command line must be specified such as:

filemanage

The file manager returns a result code that indicates whether it was exited or whether ENTER was pressed with file such as an S19 file was selected. The file manager is normally run from a script such as:

#!/bin/sh

# File manager

while :

do

/mnt/nand/bin/filemanage

tmp=$?

# store appmenu result in tmp so we can do something before case

echo "filemanager result"

echo $tmp

if [ $tmp -eq 1 ] ; then

sh /tmp/filemgr_cmd.sh

else

exit

fi

done

The script executes the file manager in a loop. If the result is 1 the file manager created script /tmp/filemgr_cmd.sh is executed to perform the command such as displaying a bitmap (imageview) or updating flash (loadsrec). After the script is executed the loop will cause file manager to run again. If the result is not 1 the exit statement will be reached causing the script to exit.

Note: See TracWiki for help on using the wiki.