> For the complete documentation index, see [llms.txt](https://swonh.gitbook.io/sdmp-user-manual-kor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://swonh.gitbook.io/sdmp-user-manual-kor/routing-module/undefined-1/vehiclecontrol.md).

# VehicleControl

Vehicle과 관련된 기능을 담당하는 컨트롤

### GetLoadableResources

```csharp
public override List<Resource> GetLoadableResources(Product product, Vehicle vehicle)
```

#### 정의

주어진 Product를 처리할 수 있는 해당 Vehicle의 Resource 리스트를 반환합니다.

#### 매개 변수

<table><thead><tr><th width="222">Type</th><th>Description</th></tr></thead><tbody><tr><td>Product</td><td>대상 Product 입니다.</td></tr><tr><td>Vehicle</td><td>대상 Vehicle 입니다.</td></tr></tbody></table>

#### 반환

<table><thead><tr><th width="183">Type</th><th width="311">Description</th><th>Default</th></tr></thead><tbody><tr><td>List&#x3C;Resource></td><td>처리가능한 Resource 목록입니다.</td><td><a href="#default-logic">Default Logic 참조</a></td></tr></tbody></table>

#### 예제 (Default Logic)

```csharp
public override List<Resource> GetLoadableResources(Product product, Vehicle vehicle)
{
    List<Resource> list = new List<Resource>();

    foreach (KeyValuePair<string, Resource> item in vehicle.Resources)
    {
        Resource res = item.Value;

        if (res.Product.ID != product.ID)
            continue;

        list.Add(res);
    }

    return list;
}
```
