기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
문제 진단 코드 사용 사례
중요
특정 AWS IoT FleetWise 기능에 대한 액세스는 현재 게이트됩니다. 자세한 내용은 AWSAWS IoT FleetWise의 리전 및 기능 가용성 단원을 참조하십시오.
다음 사용 사례에서는 DTC_QUERY
함수가 데모 스크립트
주기적 가져오기
구성된 간격으로 DTC 컬렉션을 가져옵니다.
다음 예제는 모든 ECU에 Vehicle.DTC_INFO
대해 상태 마스크가 있는 모든 DTCs 대해의 주기적 신호 가져오기가 있는 캠페인입니다. ECUs 에 대해 수집된 데이터에 대한 조건이 있습니다Vehicle.DTC_INFO
.
{ "compression": "SNAPPY", "spoolingMode": "TO_DISK", "signalsToFetch": [ { "fullyQualifiedName": "Vehicle.ECU1.DTC_INFO", "signalFetchConfig": { "timeBased": { // The FleetWise Edge Agent will query the UDS module for all DTCs every five seconds. "executionFrequencyMs": 5000 } }, "actions": [ // Every five seconds, this action is called and its output is stored in the // signal history buffer of Vehicle.DTC_INFO "custom_function(\"DTC_QUERY\", -1, 2, -1)" ] } ], "signalsToCollect": [ { "name": "Vehicle.ECU1.DTC_INFO" } ], "collectionScheme": { "conditionBasedCollectionScheme": { "conditionLanguageVersion": 1, // Whenever a new DTC is filled into the signal, the data is ingested. "expression": "!isNull($variable.`Vehicle.ECU1.DTC_INFO`)", "minimumTriggerIntervalMs": 1000, // Make sure that data is ingested only when there are new DTCs. "triggerMode": "RISING_EDGE" } }, "dataDestinationConfigs": [ { "s3Config": { "bucketArn": "bucket-arn", "dataFormat": "PARQUET", "prefix": "campaign-name", "storageCompressionFormat": "GZIP" } } ] }
조건 기반 가져오기
조건이 충족되면 DTC 컬렉션을 가져옵니다. 예를 들어 CAN 신호가 일 때 DTC 데이터를 Vehicle.Ignition == 1
가져와 업로드합니다.
다음 예제 캠페인에는 조건 기반 신호 가져오기Vehicle.ECU1.DTC_INFO
가 있어 ECU-1에 대한 recordNumber 1과 함께 DTC("AAA123")가 보류 중인지 확인합니다. recordNumber 이 캠페인에는 시간 기반 데이터 수집 및 업로드가 있습니다.
{ "compression": "SNAPPY", "spoolingMode": "TO_DISK", "signalsToFetch": [ { "fullyQualifiedName": "Vehicle.ECU1.DTC_INFO", "signalFetchConfig": { "conditionBased": { // The action will only run when the ignition is on. "conditionExpression": "$variable.`Vehicle.Ignition` == 1", "triggerMode": "ALWAYS" } }, // The UDS module is only requested for the specific ECU address and the specific DTC Number/Status. "actions": ["custom_function(\"DTC_QUERY\", 1, 2, 8, \"0xAAA123\")"] } ], "signalsToCollect": [ { "name": "Vehicle.ECU1.DTC_INFO" }, { "name": "Vehicle.Ignition" } ], "collectionScheme": { "timeBasedCollectionScheme": { "periodMs": 10000 } }, "dataDestinationConfigs": [ { "s3Config": { "bucketArn": "bucket-arn", "dataFormat": "PARQUET", "prefix": "campaign-name", "storageCompressionFormat": "GZIP" } } ] }
온디맨드 가져오기
플릿에 대한 특정 DTC를 가져옵니다.
온디맨드 사용 사례의 경우 주기적 가져오기에 정의된 것과 동일한 캠페인을 사용할 수 있습니다. 온디맨드 효과는 AWS IoT FleetWise 콘솔을 사용하여 캠페인을 배포한 직후에 캠페인을 일시 중지하거나 다음 CLI 명령을 실행하여 달성할 수 있습니다.
-
command-name
을 명령 이름으로 바꿉니다.
aws iotfleetwise update-campaign \ --name
campaign-name
\ --action APPROVE
그런 다음 DTC 데이터가 도착한 후 캠페인을 일시 중지합니다.
aws iotfleetwise update-campaign \ --name
campaign-name
\ --action SUSPEND
DTC 데이터 가져오기를 위해 캠페인을 다시 재개할 수 있습니다.
aws iotfleetwise update-campaign \ --name
campaign-name
\ --action RESUME