Dear Community User! We are updating our platform to a new system.
Read more: Important information on the platform change.

cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

How to use diagnosis/registration/register-file

How to use diagnosis/registration/register-file

nishimura
Established Member

Hello guys!

I am trying to use ctrlX diagnosis system on my Application.

I am using the Rest Interface to fire some errors with diagnosis/set/set-active. But to create my own errors, i need to register them with diagnosis/registration/register-file. Problem is that i could not do it with the help: Data type under the address types/diagnosis/registration-file - Bosch Rexroth Product Information Po...

I don´t know how to place the registration file inside the control, and which path should i use. The alternative of using "registration-file-content" also is not working for me (probably using a wrong json).

Can someone provide an example on how to do it using the Rest interface? 

 

4 REPLIES 4

nickH
Community Moderator
Community Moderator

Hello, 

the best way would be to pack the diagnostics-file inside your snap and copy it into the active-configuration (App Data) on the ctrlX CORE on installation of the snap. Please see this thread on how to do it by using an interface hook.  

Here you can browse the active Configuration on your ctrlX CORE:image.png

 

You can access the data at this path: 

/var/snap/rexroth-solutions/common/solutions/activeConfiguration/<myUserFolder>/<example.json>

 

I just tested it by uploading some example diagnostics.json via a WebDAV client (see this thread) to the activeConfiguration and typing in the path into the Data Layer browser of the ctrlX CORE (see screenshot). 

image.png

 

 

Best regards, 

Nick

 

nishimura
Established Member

Hi Nick

I tried the follwing. I created a json file with this content (copied from help):

nishimura_0-1651604955553.png

 

Them saved it as diag.json. Then i send it to active configuration ( thanks for the tip about webdav).

But when i tried to activate it:

nishimura_0-1651604721232.png

Also in the folder home/rexroot:

nishimura_1-1651604815285.png

Both return error. I guess the problem is on my diag.json content. Do you have an example?

 

nickH
Community Moderator
Community Moderator

Hi, 

thank you for reporting this issue. 

There seems to be a bug in the documentation it has to be "text", not "textEnglish" and "number" (not "diagnosisNumber"). We are going to change that in the documentation. 

Some more information regarding this topic. The format of this JSON file got changed from V1.12 to V1.14. But the format of V1.12 should still work with a ctrlX CORE V1.14. See the two sample files (one V1.12 and one V1.14) in the SDK

I also changed the sample form the documentation to V1.14. You could use that as well (if the System apps on your ctrlX CORE are V1.14): 

 

{
  "mainDiagnostics": {
      "0E0A0666":{
        "text": "Example diagnostic message",
        "version": "1"
    },
     "0E0F2666":{
      "text": "Example diagnostic error with priority 2",
      "version": "2",
      "detailedDiagnostics":{
         "00000001":{
          "text": "Example detailed diagnostic 1"
        },
          "00000002":{
          "text": "Example detailed diagnostic 2"
        }
      } 
    }
  }   
}

 

nishimura
Established Member

Hi nick!

That solved it, thanks a lot. 

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist