Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1 строка
5.8 KiB

  1. {"sections":[],"abstract":[{"type":"text","text":"Checks for controller updates based on the information frame."}],"kind":"symbol","schemaVersion":{"major":0,"patch":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/WebSocketViewModel\/checkForControllerUpdates(iFrame:)"},"metadata":{"roleHeading":"Instance Method","symbolKind":"method","title":"checkForControllerUpdates(iFrame:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"checkForControllerUpdates","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"iFrame"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Fueling18InformationMessageV","kind":"typeIdentifier","text":"InformationMessage"},{"kind":"text","text":")"}],"modules":[{"name":"Fueling"}],"role":"symbol","externalID":"s:7Fueling18WebSocketViewModelC25checkForControllerUpdates6iFrameyAA18InformationMessageV_tF"},"hierarchy":{"paths":[["doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling","doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/WebSocketViewModel"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/fueling\/websocketviewmodel\/checkforcontrollerupdates(iframe:)"]}],"primaryContentSections":[{"declarations":[{"platforms":["iOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"checkForControllerUpdates","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"iFrame"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/InformationMessage","text":"InformationMessage","preciseIdentifier":"s:7Fueling18InformationMessageV","kind":"typeIdentifier"},{"kind":"text","text":")"}]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"name":"iFrame","content":[{"type":"paragraph","inlineContent":[{"text":"The information frame received from the WebSocket.","type":"text"}]}]}]},{"content":[{"type":"heading","anchor":"discussion","text":"Discussion","level":2},{"inlineContent":[{"type":"text","text":"This method checks whether a controller update is available or in progress based on the received information frame."}],"type":"paragraph"},{"syntax":"swift","code":["func checkForControllerUpdates(iFrame: InformationMessage) {"," controllerVersion = iFrame.firmwareVersionString"," print(\"controllerVersion: \\(controllerVersion)\")"," print(\"latestControllerFirmware : \\(latestControllerFirmware)\")"," if controllerVersion != latestControllerFirmware {"," if !updateAvailable {"," updateAvailable.toggle()"," }"," }"," updateStatus = iFrame.status"," switch updateStatus {"," case \"1\":"," if !updating {"," updateAvailable.toggle()"," }"," case \"2\":"," if !updateComplete {"," updating.toggle()"," updateComplete.toggle()"," }"," default:"," break"," }","}"],"type":"codeListing"}],"kind":"content"}],"references":{"doc://rpm.com.production.Scanner/documentation/Fueling/InformationMessage":{"role":"symbol","kind":"symbol","abstract":[],"title":"InformationMessage","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"InformationMessage","kind":"identifier"}],"identifier":"doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/InformationMessage","url":"\/documentation\/fueling\/informationmessage","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InformationMessage"}]},"doc://rpm.com.production.Scanner/documentation/Fueling/WebSocketViewModel":{"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"WebSocketViewModel"}],"navigatorTitle":[{"kind":"identifier","text":"WebSocketViewModel"}],"abstract":[{"text":"The ","type":"text"},{"type":"codeVoice","code":"WebSocketViewModel"},{"type":"text","text":" class is responsible for managing WebSocket connections, handling messages, and updating application state based on WebSocket events."}],"url":"\/documentation\/fueling\/websocketviewmodel","type":"topic","identifier":"doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/WebSocketViewModel","title":"WebSocketViewModel"},"doc://rpm.com.production.Scanner/documentation/Fueling/WebSocketViewModel/checkForControllerUpdates(iFrame:)":{"identifier":"doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/WebSocketViewModel\/checkForControllerUpdates(iFrame:)","kind":"symbol","role":"symbol","abstract":[{"type":"text","text":"Checks for controller updates based on the information frame."}],"url":"\/documentation\/fueling\/websocketviewmodel\/checkforcontrollerupdates(iframe:)","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"checkForControllerUpdates"},{"kind":"text","text":"("},{"kind":"externalParam","text":"iFrame"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Fueling18InformationMessageV","text":"InformationMessage","kind":"typeIdentifier"},{"text":")","kind":"text"}],"title":"checkForControllerUpdates(iFrame:)"},"doc://rpm.com.production.Scanner/documentation/Fueling":{"kind":"symbol","url":"\/documentation\/fueling","title":"Fueling","identifier":"doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling","abstract":[{"type":"text","text":"The Scanner app is designed to facilitate secure and efficient fuel management operations, primarily focusing on user authentication, fuel data collection, and network communication. The app includes several key features to ensure seamless and reliable interactions between users and the backend systems, leveraging technologies like WebSockets, Core Data, and biometric authentication."}],"type":"topic","role":"collection"}}}