Interface ILineService
Services provided by a line to plug-ins.
public interface ILineService
Properties
Database
Gets the database service used by this line.
IDatabase Database { get; }
Property Value
DatabaseConnectionString
Gets the database connection string.
[Obsolete("This is deprecated and will be removed in a future version; Database.ConnectionString should be used instead.")]
string DatabaseConnectionString { get; }
Property Value
Name
Gets the line name.
string Name { get; }
Property Value
NotificationService
Gets the notification service provided by Acuit Pinpoint Server.
INotificationService NotificationService { get; }
Property Value
Methods
GetConfigurationForStation(string, string)
Gets the key/value configuration settings for a particular station or station type.
IConfigurationRoot GetConfigurationForStation(string stationTypeName, string stationName)
Parameters
stationTypeName
stringThe station type name.
stationName
stringThe station name, or null to retrieve the configuration settings for the station type only.
Returns
- IConfigurationRoot
A IConfigurationRoot representing the key/value configuration settings.
Exceptions
- ArgumentNullException
stationTypeName
is null.- ArgumentException
stationTypeName
is not a configured station type.
GetMatchingComponentParts(string, string, string)
Gets the list of matching component parts for a unit.
IEnumerable<PartMatch> GetMatchingComponentParts(string componentTypeName, string unitSerialNumber, string unitModelNumber)
Parameters
componentTypeName
stringThe component type name.
unitSerialNumber
stringThe unit serial number. This can be null or empty if the component lookup table for this component type does not require it.
unitModelNumber
stringThe unit model number. This should be the unit model number alias if it differs from the unit model number. This can be null or empty if the component lookup table for this component type does not require it.
Returns
- IEnumerable<PartMatch>
The matching component parts for the unit, or null if the component type does not apply to the unit.
Remarks
Note that the returned results do not comprise the complete picture as to how a component would be deemed valid. For example, the "requirePartsListEntry" setting, component serial number uniqueness checks, and "checkInstalledOnly" setting are not represented by these results. This method will simply return the parts list entries that match the specified unit.
Exceptions
- ArgumentNullException
componentTypeName
is null.- ArgumentException
componentTypeName
is not a configured component type.
GetShiftForDateTime(DateTimeOffset)
Gets the dated shift for a specific date/time, based on the line's shift configuration.
DatedShift GetShiftForDateTime(DateTimeOffset dateTime)
Parameters
dateTime
DateTimeOffsetThe date/time.
Returns
- DatedShift
The dated shift within which the date/time occurs, or if the date/time occurs outside of any shift, the closest dated shift.
IsBuyoffApplicable(string, string, string)
Determines whether a buyoff applies to a specified unit.
bool IsBuyoffApplicable(string buyoffName, string unitModelNumberAlias, string unitSerialNumber)
Parameters
buyoffName
stringThe buyoff name.
unitModelNumberAlias
stringThe unit model number alias.
unitSerialNumber
stringThe unit serial number.
Returns
Exceptions
- ArgumentNullException
buyoffName
is null.- ArgumentException
buyoffName
is not a configured buyoff.
IsComponentTypeApplicable(string, string, string)
Determines whether a component type applies to a specified unit.
bool IsComponentTypeApplicable(string componentTypeName, string unitModelNumberAlias, string unitSerialNumber)
Parameters
componentTypeName
stringThe component type name.
unitModelNumberAlias
stringThe unit model number alias.
unitSerialNumber
stringThe unit serial number.
Returns
Exceptions
- ArgumentNullException
componentTypeName
is null.- ArgumentException
componentTypeName
is not a configured component type.
IsTestTypeApplicable(string, string, string)
Determines whether a test type applies to a specified unit.
bool IsTestTypeApplicable(string testTypeName, string unitModelNumberAlias, string unitSerialNumber)
Parameters
testTypeName
stringThe test type name.
unitModelNumberAlias
stringThe unit model number alias.
unitSerialNumber
stringThe unit serial number.
Returns
Exceptions
- ArgumentNullException
testTypeName
is null.- ArgumentException
testTypeName
is not a configured test type.
RegisterCustomTestDataService(ICustomTestData)
Registers a service for providing custom test data.
void RegisterCustomTestDataService(ICustomTestData service)
Parameters
service
ICustomTestDataThe custom test data service.
Events
AddedTestResult
Occurs after a unit test result has been added.
event EventHandler<AddTestResultEventArgs> AddedTestResult
Event Type
AddingTestResult
Occurs when a unit test result is being added.
event EventHandler<AddTestResultEventArgs> AddingTestResult
Event Type
Remarks
The Status.UnitTest primitive properties (i.e., TestDateTime, Passed, Reason, or Notes) can be changed to control what results are saved to the database. This event gets raised before changes have been submitted to the database, so automatically-assigned id's of entities for newly-created records will be 0.
ComponentRemoved
Occurs when a component has been removed.
event EventHandler<ComponentEventArgs> ComponentRemoved
Event Type
Remarks
This gets raised after all processing of the component removal has been performed at the server, and the results are about to be returned to the workstation.
Both UnitReleased and ComponentRemoved events must be monitored to see all unit component changes. The event parameters are identical for both events; all that differs is the source action that triggered the change. The same event handler logic can normally be used for both.
ComponentScanned
Occurs when a component has been scanned.
event EventHandler<ComponentEventArgs> ComponentScanned
Event Type
Remarks
This gets raised after all processing of the component scan has been performed at the server, and the results are about to be returned to the workstation.
Both UnitReleased and ComponentRemoved events must be monitored to see all unit component changes. The event parameters are identical for both events; all that differs is the source action that triggered the change. The same event handler logic can normally be used for both.
PreparedBlankUnitRecords
Occurs after blank unit records have been prepared.
event EventHandler<PreparedBlankUnitRecordsEventArgs> PreparedBlankUnitRecords
Event Type
UnitReleased
Occurs when a unit has been released.
event EventHandler<UnitReleaseEventArgs> UnitReleased
Event Type
Remarks
This gets raised after all processing of the unit release has been performed at the server, and the results are about to be returned to the workstation.
Note: When a station type is configured as automated, units are never held at the station, so this event will never be raised.
UnitReleasing
Occurs when a unit is being released.
event EventHandler<UnitReleaseEventArgs> UnitReleasing
Event Type
Remarks
This gets raised before workflow transitions are processed for the unit. Upon completion of this event, if any workflow errors exist, the workflow transitions will not be performed. This event gets raised before changes have been submitted to the database, so automatically-assigned id's of entities for newly-created records will be 0.
Note: When a station type is configured as automated, units are never held at the station, so this event will never be raised.
UnitScanned
Occurs when a unit has been scanned.
event EventHandler<UnitScanEventArgs> UnitScanned
Event Type
Remarks
This gets raised after all processing of the unit scan has been performed at the server, and the results are about to be returned to the workstation.
UnitScanning
Occurs when a unit is being scanned.
event EventHandler<UnitScanEventArgs> UnitScanning
Event Type
Remarks
This gets raised before workflow transitions are processed for the unit. Upon completion of this event, if any workflow errors exist, the workflow transitions will not be performed. This event gets raised before changes have been submitted to the database, so automatically-assigned id's of entities for newly-created records will be 0.