This specification defines two fundamental methods of exchanging the actual recipe content between the client and the server/vision system combination, depending on whether the server exposes recipe information in the Address Space or not.
As stated in Section B.1.3.3, Recipes in the , the RecipeManagementType has mandatory methods which allow for the management of recipes by the client, including data transfer of the recipe content in both directions.
In principle, this works as follows:
- The client either creates a recipe entry with a new ExternalId on the vision system (using the AddRecipe method) or retrieves existing ExternalIds using the GetRecipeListFiltered or similar method and selects one of these.
- The client uses the new or selected ExternalId in the generateOptions of the call to GenerateFileForRead or GenerateFileForWrite method of the RecipeTransferType component of the RecipeManagementType object to create a temporary file object for the transfer.
- The client uses the NodeId and FileHandle of the created temporary file object to call its Read and Write methods to transfer the recipe content.
- The client uses the Close or CloseAndCommit methods of the temporary file object to end the data transfer and close the temporary file object. Note that this does not imply that the recipe is actually represented as a single file. In what way the vision system/server component uses and persists the transmitted data is implementation-defined.
For a recipe exposed in the Address Space as an entry in the optional Recipes folder of the RecipeManagementType object, the client can perform the data transfer as follows:
- The client browses through the Recipes folder to find the recipe with the desired ExternalId, or it uses the AddRecipe method to create a new recipe entry and uses the returned NodeId.
- It uses Open method of the FileType component of the detected Recipe object to open the pertaining file object for reading or writing.
- It uses the Read and Write methods of said component to transfer the data.
- It uses the Close method of said component to end the data transfer. Note that this does not imply that the recipe is actually represented as a single file. In what way the vision system/server component uses and persists the transmitted data is implementation-defined.