coder.Dictionary.set - Set property value for Embedded Coder Dictionary with service interface
configuration - MATLAB ([original](https://www.mathworks.com/help/ecoder/ref/coder.dictionary.set.html)) ([raw](?raw))
Main Content
Class: coder.Dictionary
Namespace: coder
Set property value for Embedded Coder Dictionary with service interface configuration
Since R2023b
Syntax
set(dictionary,property,value)
Description
set([dictionary](#mw%5Fe90185c9-676c-4305-a444-028f42a26d18),[property](#mw%5Fd9996760-bd68-47a7-9091-4cfee721d46b),[value](#mw%5Fb25bc937-ed6b-41e2-a4d5-e9b5a30b7ccd))
sets the property value for the specified Embedded Coder Dictionary. set
supports only Embedded Coder Dictionaries that use the service interface configuration.
Input Arguments
Embedded Coder Dictionary, specified as a coder.Dictionary
object.
Property of the coder.Dictionary
object, specified as a character vector or string scalar.
Example: 'ServicesHeaderFileName'
Data Types: string
Value to set for the property of the coder.Dictionary
object, specified as a character vector or string scalar.
Example: 'my_services.h'
Data Types: string
Examples
Create a Simulink data dictionary that contains an Embedded Coder Dictionary. Create the Embedded Coder Dictionary so that it represents a service interface configuration.
dictionaryFile = Simulink.data.dictionary.create('codeDefinitions.sldd'); codeDictionary = coder.dictionary.create('codeDefinitions.sldd','ServiceInterface');
Get the name of the header file that the service interfaces use.
headerFile = get(codeDictionary,'ServicesHeaderFileName')
headerFile =
'services.h'
The Embedded Coder Dictionary uses the default header fileservices.h
for the services.
Configure the dictionary to use the header file my_services.h
instead.
set(codeDictionary,'ServicesHeaderFileName','my_services.h');
The Embedded Coder Dictionary now uses the header filemy_services.h
for the services.
Version History
Introduced in R2023b