- device_record.ts: add lastRemoteIp field to store the CPE public IP from each Inform (X-Forwarded-For or TCP remote IP) - cwmp_controller.ts: persist lastRemoteIp on every Inform alongside lastPeriodicInformAt (single operation) - device_service.ts: sendWakeOnWlan() now tries the original URL first (may be IPv6), then falls back to a rebuilt URL using lastRemoteIp (IPv4 public IP) if the ACS server has no IPv6 connectivity
26 lines
844 B
TypeScript
26 lines
844 B
TypeScript
import { DeviceId } from './device_id.js'
|
|
import { PropertySnapshot, ParameterSnapshot } from './device_parameter.js'
|
|
import { DeviceComplianceInfo } from '../configuration/compliance.js'
|
|
import { DataModel, GpnStatus, GpnCircuitBreaker } from './device.js'
|
|
import type { DeviceReference } from '../../services/references/types.js'
|
|
|
|
export interface DeviceRecord {
|
|
identifier?: string
|
|
deviceId: DeviceId
|
|
properties: PropertySnapshot[]
|
|
parameters: ParameterSnapshot[]
|
|
gpnStatus?: GpnStatus
|
|
dataModel?: DataModel
|
|
gpnCircuitBreaker?: GpnCircuitBreaker
|
|
lastGpnSentDate?: Date | null
|
|
operationalStatus?: string
|
|
lastFailureReason?: string
|
|
compliance?: DeviceComplianceInfo
|
|
provisioningCode?: string
|
|
references?: DeviceReference[]
|
|
lastPeriodicInformAt?: Date
|
|
lastRemoteIp?: string
|
|
updatedAt?: Date
|
|
createdAt?: Date
|
|
}
|