FAST SDK Coding Reference 1.0.3
Loading...
Searching...
No Matches
SerialConnectionLoader Class Reference

Verifies and opens a serial port connection on startup. More...

Inheritance diagram for SerialConnectionLoader:
StartupLoader

Private Types

enum  SearchMethod { None , FirstAvailable , FirstNamed }
 Indicates what search method should be used if connecting to the specified COM port fails. More...
 

Private Attributes

int maxAttempts = 3
 Inspector
The number of times the specified COM port will be tried before searching for another connected COM port. Also, the number of times that the COM port found in the search will be tried before failing.
 
SearchMethod searchMethod
 Inspector
The search method that will be used if connecting to the specified COM port fails.
 
string searchName
 Inspector
The name of the serial device to search for if connecting to the specified COM port fails.
 
int settingsIndex
 Inspector
The index of the FAST.SerialConnectionSettings to use in the FAST.BaseSettings.serialConnectionSettings.
 

Additional Inherited Members

- Public Member Functions inherited from StartupLoader
void Load ()
 Runs the FAST.StartupLoader.ExecuteLoad() Coroutine
 
- Public Attributes inherited from StartupLoader
StartupErrorMessageEvent errorEvent
 Inspector, Code
Calls the function(s) subscribed to this UnityEvent when there is an error message.
 
StartupLoadingMessageEvent loadingEvent
 Inspector, Code
Calls the function(s) subscribed to this UnityEvent when there is a loading progress message.
 
StartupSuccessEvent successEvent
 Inspector, Code
Calls the function(s) subscribed to this UnityEvent when loading is done.
 
- Static Public Attributes inherited from StartupLoader
static int needToLoadCount = 0
 The number of FAST.StartupLoaders to execute on startup.
 
- Protected Member Functions inherited from StartupLoader
virtual void Awake ()
 The default behavior is to increment the FAST.StartupLoader.needToLoadCount.
 
IEnumerator ExecuteLoad ()
 The Coroutine function that executes the loading of a resource or dependency, including progress and error messages.
 
- Protected Attributes inherited from StartupLoader
string errorMessage
 A variable to compose an error message and details before invoking the FAST.StartupLoader.errorEvent.
 
string errorTitle
 A variable to compose an error message title before invoking the FAST.StartupLoader.errorEvent.
 
string loadingMessage
 A variable to compose a loading progress message and details before invoking the FAST.StartupLoader.loadingEvent.
 
float loadingMessageDuration = 0f
 Inspector
The amount of time in seconds to show a FAST.LoadingProgress message.
 
string loadingTitle
 A variable to compose a loading progress message title before invoking the FAST.StartupLoader.loadingEvent.
 

Detailed Description

Verifies and opens a serial port connection on startup.

Member Enumeration Documentation

◆ SearchMethod

enum SearchMethod
private

Indicates what search method should be used if connecting to the specified COM port fails.

Enumerator
None 

Other ports won't be searched.

FirstAvailable 

The search will start on COM3 and increment by 1 until a connection is made or COM256 is reached.

FirstNamed 

A lookup table of serial device name and port number will be made. Then the table will be searched for the first device name that matches the specified search name.

Member Data Documentation

◆ maxAttempts

int maxAttempts = 3
private

Inspector
The number of times the specified COM port will be tried before searching for another connected COM port. Also, the number of times that the COM port found in the search will be tried before failing.

◆ searchMethod

SearchMethod searchMethod
private

Inspector
The search method that will be used if connecting to the specified COM port fails.

◆ searchName

string searchName
private

Inspector
The name of the serial device to search for if connecting to the specified COM port fails.

This only applies to FAST.SerialConnectionLoader.SearchMethod.FirstNamed.

◆ settingsIndex

int settingsIndex
private

Inspector
The index of the FAST.SerialConnectionSettings to use in the FAST.BaseSettings.serialConnectionSettings.

Set to -1 if you aren't loading settings from FAST.BaseSettings.serialConnectionSettings and are just using Inspector values.


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