// processConfig processes an EVCC configuration item
// Returns:
//   a map with param name and values
processConfig processes an EVCC configuration item
Returns:
a map with param name and values
// processConfig processes an EVCC configuration item // Returns : // a map with param name and values
func (c *CmdConfigure) processConfig(paramItems []templates.Param, deviceCategory DeviceCategory) map[string]interface{} {
	usageFilter := DeviceCategories[deviceCategory].categoryFilter
	additionalConfig := make(map[string]interface{})
	fmt.Println()
	fmt.Println(c.localizedString("Config_Title", nil))
	fmt.Println()
	for _, param := range paramItems {
		switch param.Name {
		case templates.ParamModbus:
			c.processModbusConfig(param, deviceCategory, additionalConfig)
		case templates.ParamUsage:
			if usageFilter != "" {
				additionalConfig[param.Name] = usageFilter.String()
			}
		default:
			if !c.advancedMode && param.Advanced {
				continue
			}
			switch param.ValueType {
			case templates.ParamValueTypeStringList:
				additionalConfig[param.Name] = c.processListInputConfig(param)
			default:
				additionalConfig[param.Name] = c.processInputConfig(param)
			}
		}
	}
	return additionalConfig
}
func ( c * CmdConfigure ) processConfig ( paramItems [ ] templates . Param , deviceCategory DeviceCategory ) map [ string ] interface { } { usageFilter := DeviceCategories [ deviceCategory ] . categoryFilter additionalConfig := make ( map [ string ] interface { } ) fmt . Println ( ) fmt . Println ( c . localizedString ( " " , nil ) ) fmt . Println ( ) for _ , param := range paramItems { switch param . Name { case templates . ParamModbus : c . processModbusConfig ( param , deviceCategory , additionalConfig ) case templates . ParamUsage : if usageFilter != " " { additionalConfig [ param . Name ] = usageFilter . String ( ) } default : if ! c . advancedMode && param . Advanced { continue } switch param . ValueType { case templates . ParamValueTypeStringList : additionalConfig [ param . Name ] = c . processListInputConfig ( param ) default : additionalConfig [ param . Name ] = c . processInputConfig ( param ) } } } return additionalConfig }
processConfig processes an EVCC configuration item
Returns:
a map with param name and values
processConfig processes an EVCC configuration item Returns : a map with param name and values