2.4 KiB
2.4 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |
|---|---|---|---|---|---|
|
2026-04-17T16:13:50.698481+00:00 | zai-org/GLM-5-FP8 | 1 | 02b33d07988ee1e0 |
DAS
Purpose
This module provides data access layer functionality for DAS (Data Acquisition System) communication records. It exists to insert new DAS device records into the factory database, capturing device identification (serial number), firmware version, and connection metadata through a stored procedure interface.
Public Interface
DAS.InsertDASSimple(string serialNumber, string firmwareVersion, string connectString) → int
- Inserts a new record into the DAS communication table via the
sp_IDASCommunicationTableSimpleInsertstored procedure. - Parameters:
serialNumber(string): Device serial number, passed asNVarChar(50)firmwareVersion(string): Firmware version string, passed asNVarChar(50)connectString(string): Connection string, passed asNVarChar(255)
- Returns the newly created record ID from the
@new_idoutput parameter. - Throws or propagates errors via
DbWrapper.ProcessReturn()if the stored procedure sets@errorNumber.
Invariants
- The stored procedure
sp_IDASCommunicationTableSimpleInsertmust exist in the target database. DbWrapper.GetDASFactoryCommand()must return a valid, executable command object with an open connection.- The returned
new_idwill be a valid integer upon successful insertion.
Dependencies
- Depends on:
DbWrapper(static class providingGetDASFactoryCommand()andProcessReturn(SqlParameter, SqlParameter)methods) - inferred from usage but not shown in source. - Depends on:
System.Data,System.Data.SqlClientfor ADO.NET infrastructure. - Consumers: Unknown from source alone - likely factory calibration or device registration workflows.
Gotchas
- Parameter naming inconsistency: The
connectStringparameter is added as"ConnectString"(camelCase vs PascalCase) - this may cause issues if the stored procedure is case-sensitive. - Connection disposal pattern: The
cmd.Connection.Dispose()is called in afinallyblock, but theusingstatement wrappingcmdwould typically handle command disposal. This suggests the connection lifecycle is managed separately from the command. - No null validation: The method does not validate input parameters before passing to the stored procedure.