Table of Contents

Interface ILineService

Namespace
Acuit.Pinpoint.Server
Assembly
Acuit.Pinpoint.Server.Interfaces.dll

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

IDatabase

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

string

Name

Gets the line name.

string Name { get; }

Property Value

string

NotificationService

Gets the notification service provided by Acuit Pinpoint Server.

INotificationService NotificationService { get; }

Property Value

INotificationService

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 string

The station type name.

stationName string

The 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 string

The component type name.

unitSerialNumber string

The unit serial number. This can be null or empty if the component lookup table for this component type does not require it.

unitModelNumber string

The 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 DateTimeOffset

The 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 string

The buyoff name.

unitModelNumberAlias string

The unit model number alias.

unitSerialNumber string

The unit serial number.

Returns

bool

true if the buyoff applies; otherwise false.

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 string

The component type name.

unitModelNumberAlias string

The unit model number alias.

unitSerialNumber string

The unit serial number.

Returns

bool

true if the component type applies; otherwise false.

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 string

The test type name.

unitModelNumberAlias string

The unit model number alias.

unitSerialNumber string

The unit serial number.

Returns

bool

true if the test type applies; otherwise false.

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 ICustomTestData

The custom test data service.

Events

AddedTestResult

Occurs after a unit test result has been added.

event EventHandler<AddTestResultEventArgs> AddedTestResult

Event Type

EventHandler<AddTestResultEventArgs>

AddingTestResult

Occurs when a unit test result is being added.

event EventHandler<AddTestResultEventArgs> AddingTestResult

Event Type

EventHandler<AddTestResultEventArgs>

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

EventHandler<ComponentEventArgs>

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

EventHandler<ComponentEventArgs>

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

EventHandler<PreparedBlankUnitRecordsEventArgs>

UnitReleased

Occurs when a unit has been released.

event EventHandler<UnitReleaseEventArgs> UnitReleased

Event Type

EventHandler<UnitReleaseEventArgs>

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

EventHandler<UnitReleaseEventArgs>

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

EventHandler<UnitScanEventArgs>

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

EventHandler<UnitScanEventArgs>

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.